Commit 90b1ae21 authored by andrei's avatar andrei

2.4.3 version: ASM 5.0.2, added branding icon, set minimum JRE to 1.6

parent c45637ba
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry combineaccessrules="false" kind="src" path="/asm3"/>
<classpathentry kind="src" path="src"/>
<classpathentry excluding="JCL/" kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="**/jdt/internal/**"/>
</accessrules>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry combineaccessrules="false" kind="src" path="/asm3"/>
<classpathentry kind="src" path="src"/>
<classpathentry excluding="JCL/" kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="**/jdt/internal/**"/>
</accessrules>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>
#FindBugs User Preferences
#Fri Sep 09 22:29:21 CEST 2011
#Tue Jun 24 10:13:45 CEST 2014
cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud
detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
detectorAtomicityProblem=AtomicityProblem|true
......@@ -17,6 +17,7 @@ detectorCalledMethods=CalledMethods|true
detectorCheckCalls=CheckCalls|false
detectorCheckExpectedWarnings=CheckExpectedWarnings|false
detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
detectorCheckRelaxingNullnessAnnotation=CheckRelaxingNullnessAnnotation|true
detectorCheckTypeQualifiers=CheckTypeQualifiers|true
detectorCloneIdiom=CloneIdiom|true
detectorComparatorIdiom=ComparatorIdiom|false
......@@ -67,6 +68,7 @@ detectorFindOpenStream=FindOpenStream|true
detectorFindPuzzlers=FindPuzzlers|true
detectorFindRefComparison=FindRefComparison|true
detectorFindReturnRef=FindReturnRef|false
detectorFindRoughConstants=FindRoughConstants|true
detectorFindRunInvocations=FindRunInvocations|true
detectorFindSelfComparison=FindSelfComparison|true
detectorFindSelfComparison2=FindSelfComparison2|true
......@@ -88,6 +90,7 @@ detectorHugeSharedStringConstants=HugeSharedStringConstants|true
detectorIDivResultCastToDouble=IDivResultCastToDouble|true
detectorIncompatMask=IncompatMask|true
detectorInconsistentAnnotations=InconsistentAnnotations|true
detectorInefficientIndexOf=InefficientIndexOf|true
detectorInefficientMemberAccess=InefficientMemberAccess|false
detectorInefficientToArray=InefficientToArray|true
detectorInfiniteLoop=InfiniteLoop|true
......@@ -95,6 +98,7 @@ detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false
detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
detectorInitializationChain=InitializationChain|true
detectorInitializeNonnullFieldsInConstructor=InitializeNonnullFieldsInConstructor|true
detectorInstantiateStaticClass=InstantiateStaticClass|true
detectorIntCast2LongAsInstant=IntCast2LongAsInstant|true
detectorInvalidJUnitTest=InvalidJUnitTest|true
......@@ -119,6 +123,7 @@ detectorNoteNonnullReturnValues=NoteNonnullReturnValues|true
detectorNoteSuppressedWarnings=NoteSuppressedWarnings|true
detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
detectorNumberConstructor=NumberConstructor|true
detectorOptionalReturnNull=OptionalReturnNull|true
detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
detectorPublicSemaphores=PublicSemaphores|true
......
#Wed Sep 07 22:32:50 CEST 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
......@@ -10,8 +9,15 @@ org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
......@@ -29,6 +35,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
......@@ -47,12 +54,16 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
......@@ -62,13 +73,20 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warni
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
......@@ -76,10 +94,12 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
......@@ -98,9 +118,10 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH
org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
......@@ -177,10 +198,12 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
......
#Sat Sep 03 21:57:36 CEST 2011
cleanup.add_default_serial_version_id=true
cleanup.add_generated_serial_version_id=false
cleanup.add_missing_annotations=false
cleanup.add_missing_annotations=true
cleanup.add_missing_deprecated_annotations=true
cleanup.add_missing_methods=false
cleanup.add_missing_nls_tags=false
cleanup.add_missing_override_annotations=true
cleanup.add_missing_override_annotations_interface_methods=true
cleanup.add_serial_version_id=false
cleanup.always_use_blocks=true
cleanup.always_use_parentheses_in_expressions=false
cleanup.always_use_this_for_non_static_field_access=false
cleanup.always_use_this_for_non_static_method_access=false
cleanup.convert_functional_interfaces=false
cleanup.convert_to_enhanced_for_loop=false
cleanup.correct_indentation=true
cleanup.correct_indentation=false
cleanup.format_source_code=false
cleanup.format_source_code_changes_only=false
cleanup.make_local_variable_final=true
cleanup.insert_inferred_type_arguments=false
cleanup.make_local_variable_final=false
cleanup.make_parameters_final=false
cleanup.make_private_fields_final=true
cleanup.make_type_abstract_if_missing_method=false
......@@ -29,6 +31,7 @@ cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=tru
cleanup.qualify_static_member_accesses_with_declaring_class=true
cleanup.qualify_static_method_accesses_with_declaring_class=false
cleanup.remove_private_constructors=true
cleanup.remove_redundant_type_arguments=true
cleanup.remove_trailing_whitespaces=true
cleanup.remove_trailing_whitespaces_all=true
cleanup.remove_trailing_whitespaces_ignore_empty=false
......@@ -42,13 +45,16 @@ cleanup.remove_unused_private_methods=true
cleanup.remove_unused_private_types=true
cleanup.sort_members=false
cleanup.sort_members_all=false
cleanup.use_anonymous_class_creation=false
cleanup.use_blocks=true
cleanup.use_blocks_only_for_return_and_throw=false
cleanup.use_lambda=true
cleanup.use_parentheses_in_expressions=false
cleanup.use_this_for_non_static_field_access=false
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
cleanup.use_this_for_non_static_method_access=false
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
cleanup.use_type_arguments=false
cleanup_profile=_BCO
cleanup_settings_version=2
comment_clear_blank_lines=true
......@@ -83,10 +89,12 @@ sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_functional_interfaces=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.insert_inferred_type_arguments=false
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
......@@ -102,6 +110,7 @@ sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=
sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_redundant_type_arguments=false
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
......@@ -115,10 +124,13 @@ sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_anonymous_class_creation=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_lambda=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
sp_cleanup.use_type_arguments=false
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bytecode Outline
Bundle-SymbolicName: de.loskutov.BytecodeOutline;singleton:=true
Bundle-Version: 2.4.2
Bundle-Version: 2.4.3
Bundle-ClassPath: .,
lib/asm-debug-all.jar
Bundle-Activator: de.loskutov.bco.BytecodeOutlinePlugin
......@@ -22,5 +22,5 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.jdt.debug,
org.junit;resolution:=optional
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
# about.ini
# contains information about a feature
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# "%key" are externalized strings defined in about.properties
# This file does not need to be translated.
# Property "aboutText" contains blurb for "About" dialog (translated)
aboutText=%featureText
# Property "featureImage" contains path to feature image (32x32)
featureImage=about32.png
# Property "appName" contains name of the application (translated)
appName=%featureName
\ No newline at end of file
featureName=Bytecode Outline
featureText=Bytecode Outline\
\n\
(c) Copyright Andrey Loskutov. All rights reserved. \n\
Visit http://andrei.gmxhome.de
about32.png

409 Bytes

......@@ -7,7 +7,10 @@ bin.includes = LICENSE.txt,\
about.html,\
.project,\
.settings/,\
lib/asm-debug-all.jar
lib/asm-debug-all.jar,\
about.ini,\
about.properties,\
about32.png
jars.compile.order = .
source.. = src/,\
......
......@@ -68,7 +68,7 @@
<fileset dir="${eclipse.home}" includes="plugins/**/*.jar"/>
</path>
<mkdir dir="${out.build}"/>
<javac destdir="${out.build}" debug="on" source="1.5" target="1.5" includeantruntime="false">
<javac destdir="${out.build}" debug="on" source="1.6" target="1.6" includeantruntime="false">
<classpath refid="classpath"/>
<src path="${src}"/>
<include name="**/*.java"/>
......@@ -123,6 +123,9 @@
<include name="icons/**/*"/>
<include name="plugin.xml"/>
<include name="about.html"/>
<include name="about.ini"/>
<include name="about.properties"/>
<include name="about32.png"/>
<include name="*.txt"/>
<include name="lib/*.jar"/>
</fileset>
......
......@@ -11,9 +11,9 @@
<BugCode name="Se"/>
</Match>
<Match>
<Package name="inner.*"/>
<Package name="~inner.*"/>
</Match>
<Match>
<Class name="Test*"/>
</Match>
<Class name="~.*Test.*"/>
</Match>
</FindBugsFilter>
/*****************************************************************************************
* Copyright (c) 2004 Andrei Loskutov. All rights reserved. This program and the
* accompanying materials are made available under the terms of the BSD License which
* accompanies this distribution, and is available at
* http://www.opensource.org/licenses/bsd-license.php Contributor: Andrei Loskutov -
* initial API and implementation
****************************************************************************************/
package de.loskutov.bco;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The main plugin class to be used in the desktop.
*/
public class BytecodeOutlinePlugin extends AbstractUIPlugin {
//The shared instance.
private static BytecodeOutlinePlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
public static boolean DEBUG;
/**
* The constructor.
*/
public BytecodeOutlinePlugin() {
super();
if(plugin != null){
throw new IllegalStateException("Bytecode outline plugin is a singleton!");
}
plugin = this;
try {
resourceBundle = ResourceBundle
.getBundle("de.loskutov.bco.BytecodeOutlinePluginResources"); //$NON-NLS-1$
} catch (MissingResourceException x) {
resourceBundle = null;
}
}
/**
* This method is called upon plug-in activation
* @param context
* @throws Exception
*/
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
DEBUG = isDebugging();
}
/**
* This method is called when the plug-in is stopped
* @param context
* @throws Exception
*/
@Override
public void stop(BundleContext context) throws Exception {
super.stop(context);
}
/**
* Returns the shared instance.
* @return plugin
*/
public static BytecodeOutlinePlugin getDefault() {
return plugin;
}
/**
* Returns the string from the plugin's resource bundle, or 'key' if not found.
* @param key
* @return translation
*/
public static String getResourceString(String key) {
ResourceBundle bundle = BytecodeOutlinePlugin.getDefault()
.getResourceBundle();
try {
return (bundle != null)
? bundle.getString(key)
: key;
} catch (MissingResourceException e) {
return key;
}
}
/**
* Returns the plugin's resource bundle,
*/
public ResourceBundle getResourceBundle() {
return resourceBundle;
}
/**
* Returns the workspace instance.
* @return shell object
*/
public static Shell getShell() {
return getDefault().getWorkbench().getActiveWorkbenchWindow()
.getShell();
}
/**
* @param messageID
* @param error
*/
public static void error(String messageID, Throwable error) {
Shell shell = getShell();
String message = getResourceString("BytecodeOutline.Error"); //$NON-NLS-1$
if (messageID != null) {
message = getResourceString(messageID);
}
if (error != null) {
message += " " + error.getMessage();
}
MessageDialog.openError(
shell, getResourceString("BytecodeOutline.Title"), //$NON-NLS-1$
message);
getDefault().getLog().log(
new Status(IStatus.ERROR, "BytecodeOutline", 0, message, error)); //$NON-NLS-1$
}
/**
* @param statusID one of IStatus. constants like IStatus.ERROR etc
* @param error
*/
public static void log(Throwable error, int statusID) {
String message = error.getMessage();
if(message == null){
message = error.toString();
}
getDefault().getLog()
.log(
new Status(
statusID,
"BytecodeOutline", 0, message, error)); //$NON-NLS-1$
}
}
BytecodeOutline.Title=Bytecode Outline
BytecodeOutline.Error=Error (Bytecode Outline)
BytecodeOutlineView.lvt.tooltip=LVT
BytecodeOutlineView.stack.tooltip=STACK
BytecodeOutlineView.lvt.header=Vars
BytecodeOutlineView.stack.header=Stack
BytecodeOutlineView.select_all.label=Select &All@Ctrl+A
BytecodeOutlineView.select_all.tooltip=Select All
BytecodeOutlineView.select_all.description=Select All
BytecodeOutlineView.copy.label=Copy
BytecodeOutlineView.copy.tooltip=Copy
BytecodeOutlineView.copy.description=Copy
BytecodeOutlineView.find_replace.label=&Find...@Ctrl+F
BytecodeOutlineView.find_replace.tooltip=Find in bytecode
BytecodeOutlineView.find_replace.description=Find in bytecode
BytecodeOutlineView.find_replace.image=
BytecodeOutlineView.toggle.vertical.label=&Vertical View Orientation
BytecodeOutlineView.toggle.horizontal.label=&Horizontal View Orientation
BytecodeOutlineView.toggle.automatic.label=&Automatic View Orientation
BytecodeReferenceView.empty.selection.text=<html><head><title>Bytecode reference</title></head><body bgcolor='#D3D3D3'>Please select any bytecode instruction in the bytecode outline view.</body></html>
BCOPreferencePage.description=Bytecode Outline View Settings
BCOPreferencePage.defaultsGroup=Outline
BCOPreferencePage.compareGroup=Compare
BCOPreferencePage.miscGroup=Misc...
BCOPreferencePage.showVariables=Show variables
BCOPreferencePage.showLineInfo=Show line info
BCOPreferencePage.showStackMap=Show stack map
BCOPreferencePage.expandStackMap=Expand stack map
BCOPreferencePage.recalculateStackMap=Recalculate stack map
BCOPreferencePage.showRawBytecode=Show internal types
BCOPreferencePage.showAnalyzer=Show analyzer pane
BCOPreferencePage.showAsmifierCode=Show ASMifier code
BCOPreferencePage.showOnlySelected=Show bytecode for selected element only
BCOPreferencePage.linkViewToEditor=Link Bytecode Outline view to editor
BCOPreferencePage.linkRefViewToEditor=Link Bytecode Reference view to editor
BCOPreferencePage.showHexValues=Show hex values for numeric constants
BCOPreferencePage.diffExpandStackMap=Expand stack map
BCOPreferencePage.diffShowStackMap=Show stack map
BCOPreferencePage.diffShowLineInfo=Show line info
BCOPreferencePage.diffShowVariables=Show variables
BCOPreferencePage.diffShowAsmifierCode=Show ASMifier code
action.showVariables.text=Show local variables
action.showVariables.toolTipText=Show local variables (if available in bytecode)
action.showVariables.image=icons/hide_locals.gif
action.showLineInfo.text=Show line info
action.showLineInfo.toolTipText=Show line info (if available in bytecode)
action.showLineInfo.image=icons/hide_line_info.gif
action.showStackmap.text=Show StackMap
action.showStackmap.toolTipText=Show StackMap info (if available in bytecode)
action.showStackmap.image=icons/stackmap.gif
action.expandStackmap.text=Expand StackMap
action.expandStackmap.toolTipText=Expand StackMap frames (if StackMap is available in bytecode)
action.expandStackmap.image=icons/stackmapexp.gif
action.showASMifierCode.text=Toggle ASMifier mode on/off
action.showASMifierCode.toolTipText=Show ASMified code
action.showASMifierCode.image=icons/asm.gif
action.showAnalyzer.text=Show bytecode analyzer pane
action.showAnalyzer.toolTipText=Show state of the execution stack frames
action.showAnalyzer.image=icons/verify.gif
action.showRawBytecode.text=Show readable bytecode
action.showRawBytecode.toolTipText=Show internal types
action.showRawBytecode.image=icons/raw_mode.gif
action.showOnlySelectedElement.text=Show current element only
action.showOnlySelectedElement.toolTipText=Show bytecode for current field/method only
action.showOnlySelectedElement.image=icons/selected_only.gif
action.linkViewToEditor.text=Link with editor
action.linkViewToEditor.toolTipText=Link With Editor
action.linkViewToEditor.image=icons/link_with_editor.gif
action.linkRefViewToEditor.text=Link with editor
action.linkRefViewToEditor.toolTipText=Link With Editor
action.linkRefViewToEditor.image=icons/link_with_editor.gif
action.showHexValues.text=Show values in hex format
action.showHexValues.toolTipText=Show numerical constant values in hex format
action.showHexValues.image=icons/hex_mode.gif
This diff is collapsed.
This diff is collapsed.
/*******************************************************************************
* Copyright (c) 2011 Andrey Loskutov. All rights reserved. This program and the
* accompanying materials are made available under the terms of the BSD License which
* accompanies this distribution, and is available at
* http://www.opensource.org/licenses/bsd-license.php Contributor: Andrey Loskutov -
* initial API and implementation
*******************************************************************************/
package de.loskutov.bco.asm;
public class DecompiledClassInfo {
/**
* Major.minor or ?
*/
public final String javaVersion;
public final int accessFlags;
public final int major;
public DecompiledClassInfo(String javaVersion, int accessFlags) {
this.javaVersion = javaVersion;
this.accessFlags = accessFlags;
major = javaVersion.startsWith("1.")? Integer.parseInt(javaVersion.substring(2)) : 0;
}
}
This diff is collapsed.
/*******************************************************************************
* Copyright (c) 2011 Eric Bruneton.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the BSD License
* which accompanies this distribution, and is available at
* http://www.opensource.org/licenses/bsd-license.php
* Contributor: Eric Bruneton - initial API and implementation
* Contributor: Andrey Loskutov - fixes
*******************************************************************************/
package de.loskutov.bco.asm;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.util.Printer;
import org.objectweb.asm.util.TraceClassVisitor;
import de.loskutov.bco.preferences.BCOConstants;
/**
* @author Eric Bruneton
*/
public class DecompilerHelper {
public static DecompiledClass getDecompiledClass(final InputStream is,
DecompilerOptions options)
throws IOException, UnsupportedClassVersionError {
ClassReader cr = new ClassReader(is);
ClassNode cn = new ClassNode(Opcodes.ASM5);
int crFlags = 0;
if(options.modes.get(BCOConstants.F_EXPAND_STACKMAP)) {
crFlags |= ClassReader.EXPAND_FRAMES;
}
cr.accept(cn, crFlags);
ICommentedClassVisitor printer;
if (options.modes.get(BCOConstants.F_SHOW_ASMIFIER_CODE)) {
printer = new CommentedASMifierClassVisitor(cn, options);
} else {
printer = new CommentedClassVisitor(cn, options);
}
TraceClassVisitor dcv = new TraceClassVisitor(null, (Printer) printer, null);
cn.accept(dcv);
return getResult(printer, options, cn);
}
private static DecompiledClass getResult(ICommentedClassVisitor printer, DecompilerOptions options, ClassNode classNode) {
List<Object> classText = new ArrayList<Object>();
formatText(printer.getText(), new StringBuffer(), classText, options.cl);
while (classText.size() > 0 && classText.get(0).equals("\n")) {
classText.remove(0);
}
DecompiledClassInfo classInfo = printer.getClassInfo();
return new DecompiledClass(classText, classInfo, classNode);
}
private static void formatText(final List input, final StringBuffer line, final List<Object> result,
final ClassLoader cl) {
for (int i = 0; i < input.size(); ++i) {
Object o = input.get(i);
if (o instanceof List) {
formatText((List) o, line, result, cl);
} else if (o instanceof DecompiledMethod) {
result.add(o);
} else {
String s = o.toString();
int p;
do {
p = s.indexOf('\n');
if (p == -1) {
line.append(s);
} else {
result.add(line.toString() + s.substring(0, p + 1));
s = s.substring(p + 1);
line.setLength(0);
}
} while (p != -1);
}
}
}
}
/*******************************************************************************
* Copyright (c) 2011 Andrey Loskutov. All rights reserved. This program and the
* accompanying materials are made available under the terms of the BSD License which
* accompanies this distribution, and is available at
* http://www.opensource.org/licenses/bsd-license.php Contributor: Andrey Loskutov -
* initial API and implementation
*******************************************************************************/
package de.loskutov.bco.asm;
import java.util.BitSet;
public class DecompilerOptions {