Commit 0709c15c authored by andrei's avatar andrei

Fixed "disabled view" bug by toggling link with editor off, added the BCO...

Fixed "disabled view" bug by toggling link with editor off, added the BCO preference page, changed version to 2.2.5
parent 6c6e1ccc
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry combineaccessrules="false" kind="src" path="/asm 3.0"/>
<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"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="**/jdt/internal/**"/>
</accessrules>
</classpathentry>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
#FindBugs User Preferences
#Thu Jul 20 21:40:00 CEST 2006
#Mon Dec 04 23:49:19 CET 2006
default_directory=F\:\\java\\eclipse32
detector29=EqStringTest|false
detector28=NoteAnnotationRetention|true
detector27=BadlyOverriddenAdapter|true
detector26=ReadReturnShouldBeChecked|true
detector25=NoteUnconditionalParamDerefs|true
detector24=FindJSR166LockMonitorenter|true
detector109=ConfusingAutoboxedOverloading|true
detector23=InvalidJUnitTest|true
detector108=FindUnconditionalWait|true
detector22=FindRunInvocations|true
detector107=FloatingPointLoops|true
detector21=MutableLock|true
detector106=UseObjectEquals|false
detector20=MultithreadedInstanceAccess|true
detector105=DumbMethods|true
detector104=VarArgsProblems|true
detector103=ArrayWrappedCallByReference|true
detector102=FindUncalledPrivateMethods|true
detector101=FindMaskedFields|true
detector100=AbnormalFinallyBlockReturn|true
filter_settings=Medium|CORRECTNESS,PERFORMANCE,I18N,MT_CORRECTNESS,STYLE,MALICIOUS_CODE|false
detector19=InfiniteLoop|false
detector18=LiteralStringComparison|true
detector17=DoInsideDoPriviledged|true
detector16=FindPuzzlers|true
detector15=RedundantInterfaces|true
detector0=SluggishGui|true
detector100=StaticArrayCreatedInMethod|true
detector101=IncompatMask|true
detector102=AbnormalFinallyBlockReturn|true
detector103=FindMaskedFields|true
detector104=FindUncalledPrivateMethods|true
detector105=ArrayWrappedCallByReference|true
detector106=VarArgsProblems|true
detector107=DumbMethods|true
detector108=UseObjectEquals|false
detector109=FloatingPointLoops|true
detector10=FindBadForLoop|true
detector110=DoInsideDoPrivileged|true
detector111=FindUnconditionalWait|true
detector112=ConfusingAutoboxedOverloading|true
detector113=VolatileUsage|true
detector114=ComparatorIdiom|false
detector115=FindRefComparison|true
detector116=DateComparison|true
detector117=NoteSuppressedWarnings|true
detector118=UseEnumCollections|true
detector119=CloneIdiom|true
detector11=LockedFields|false
detector120=FindNullDeref|true
detector121=ConstantListIndex|false
detector122=CalledMethods|true
detector123=DubiousListCollection|true
detector124=NeedlessAutoboxing|true
detector125=FindLocalSelfAssignment2|true
detector126=FindBadCast2|true
detector127=RedundantMethodCalls|false
detector128=FindSpinLoop|true
detector129=LazyInit|true
detector12=StringConcatenation|true
detector130=CheckCalls|false
detector131=UselessSubclassMethod|false
detector132=StaticMethodInstanceInvocation|true
detector133=FindCircularDependencies|false
detector134=DuplicateBranches|true
detector135=NonCollectionMethodUse|true
detector136=FindTwoLockWait|true
detector137=TrainUnconditionalDerefParams|true
detector138=StartInConstructor|true
detector139=FindNonShortCircuit|true
detector13=FindFinalizeInvocations|true
detector140=PossibleMemoryBloat|true
detector141=FinalParameters|true
detector142=JDBCVendorReliance|true
detector143=FindUnreleasedLock|true
detector144=FieldCouldBeLocal|true
detector145=ResolveAllReferences|false
detector146=NoteCheckReturnValueAnnotations|true
detector147=UncallableMethodOfAnonymousClass|true
detector148=FindBugsSummaryStats|true
detector149=FindNonSerializableValuePassedToWriteObject|true
detector14=NoteCheckReturnValue|true
detector13=NonOwnedSynchronization|true
detector12=FindFinalizeInvocations|true
detector11=StringConcatenation|true
detector10=LockedFields|false
detector_threshold=2
detector99=IncompatMask|true
detector98=StaticArrayCreatedInMethod|true
detector97=FindMismatchedWaitOrNotify|true
detector96=TrainNonNullAnnotations|true
detector95=Methods|true
detector94=FindOpenStream|true
detector93=InefficientMemberAccess|false
detector92=FindDoubleCheck|true
detector91=IteratorIdioms|true
detector90=CopiedOverriddenMethod|true
detector89=InheritanceTypeChecking|false
detector88=SuspiciousThreadInterrupted|true
detector87=UnnecessaryStoreBeforeReturn|false
detector86=InfiniteRecursiveLoop|true
detector85=RuntimeExceptionCapture|true
detector84=UnrelatedCollectionContents|true
detector83=NoteJCIPAnnotation|true
detector82=ConfusionBetweenInheritedAndOuterMethod|true
detector81=UseToArray|true
detector165=NeedlessMemberCollectionSynchronization|true
detector80=BadResultSetAccess|true
detector164=CheckImmutableAnnotation|true
detector163=DroppedException|true
detector162=FindHEmismatch|true
detector161=MethodReturnCheck|true
detector160=OverlyConcreteParameter|true
detector79=MutableStaticFields|true
detector78=BadUseOfReturnValue|true
detector77=Naming|true
detector76=InheritanceUnsafeGetResource|true
detector75=CustomBuiltXML|true
detector159=AbstractOverriddenMethod|true
detector74=InefficientToArray|true
detector158=FindSqlInjection|true
detector73=FindUnsatisfiedObligation|false
detector157=EmptyZipFileEntry|true
detector72=FindDeadLocalStores|true
detector156=InitializationChain|true
detector71=DumbMethodInvocations|true
detector155=PublicSemaphores|true
detector70=LoadOfKnownNullValue|true
detector154=InfiniteRecursiveLoop2|false
detector153=OrphanedDOMNode|true
detector152=SwitchFallthrough|true
detector151=FindInconsistentSync2|true
detector150=NeedlessInstanceRetrieval|true
detector9=FindBadForLoop|true
detector8=BCPMethodReturnCheck|false
detector7=FindUnsyncGet|true
detector6=DeclaredRuntimeException|true
detector5=FindNonSerializableStoreIntoSession|true
detector4=DontCatchIllegalMonitorStateException|true
detector3=FindNakedNotify|true
detector2=BadSyntaxForRegularExpression|true
detector150=FindFloatMath|false
detector151=AbstractClassEmptyMethods|false
detector152=SloppyClassReflection|true
detector153=NeedlessInstanceRetrieval|true
detector154=FindInconsistentSync2|true
detector155=SwitchFallthrough|true
detector156=OrphanedDOMNode|true
detector157=InfiniteRecursiveLoop2|false
detector158=PublicSemaphores|true
detector159=InitializationChain|true
detector15=NonOwnedSynchronization|true
detector160=EmptyZipFileEntry|true
detector161=FindSqlInjection|true
detector162=AbstractOverriddenMethod|true
detector163=OverlyConcreteParameter|true
detector164=MethodReturnCheck|true
detector165=FindHEmismatch|true
detector166=DroppedException|true
detector167=CheckImmutableAnnotation|true
detector168=NeedlessMemberCollectionSynchronization|true
detector16=FindPuzzlers|true
detector17=RedundantInterfaces|true
detector18=DoInsideDoPriviledged|true
detector19=LiteralStringComparison|true
detector1=TestingGround|false
detector0=SluggishGui|true
detector69=FindSleepWithLockHeld|true
detector68=SuperfluousInstanceOf|true
detector67=FindBadCast|false
detector66=SerializableIdiom|true
detector65=ConfusedInheritance|true
detector149=SloppyClassReflection|true
detector64=TrainFieldStoreTypes|true
detector148=AbstractClassEmptyMethods|false
detector63=UnnecessaryMath|true
detector147=FindFloatMath|false
detector62=SQLInLoop|true
detector146=FindNonSerializableValuePassedToWriteObject|true
detector61=PreferZeroLengthArrays|true
detector145=FindBugsSummaryStats|true
detector60=SyncCollectionIterators|true
detector144=UncallableMethodOfAnonymousClass|true
detector143=NoteCheckReturnValueAnnotations|true
detector142=ResolveAllReferences|false
detector141=FieldCouldBeLocal|true
detector140=FindUnreleasedLock|true
detector59=WrongMapIterator|true
detector58=FindReturnRef|false
detector57=UnreadFields|true
detector20=InfiniteLoop|false
detector21=MutableLock|true
detector22=MultithreadedInstanceAccess|true
detector23=FindRunInvocations|true
detector24=InvalidJUnitTest|true
detector25=HugeSharedStringConstants|true
detector26=FindJSR166LockMonitorenter|true
detector27=NoteUnconditionalParamDerefs|true
detector28=ReadReturnShouldBeChecked|true
detector29=BadlyOverriddenAdapter|true
detector2=BadSyntaxForRegularExpression|true
detector30=NoteAnnotationRetention|true
detector31=EqStringTest|false
detector32=InstantiateStaticClass|true
detector33=BloatedSynchronizedBlock|true
detector34=WaitInLoop|true
detector35=SpuriousThreadStates|true
detector36=XMLFactoryBypass|true
detector37=Section508Compliance|true
detector38=FindEmptySynchronizedBlock|true
detector39=ListIndexedIterating|true
detector3=FindNakedNotify|true
detector40=NonRecycleableTaglibs|true
detector41=NoteNonNullAnnotations|true
detector42=FindUselessControlFlow|true
detector43=InefficientStringBuffering|true
detector44=IDivResultCastToDouble|true
detector45=FindFieldSelfAssignment|true
detector46=FindBadEqualsImplementation|false
detector47=BadAppletConstructor|false
detector48=PartiallyConstructedObjectAccess|true
detector49=SuspiciousWaitOnConcurrentObject|true
detector4=NumberConstructor|true
detector50=FindFloatEquality|true
detector51=FindUninitializedGet|true
detector52=CyclomaticComplexity|true
detector53=ClassEnvy|false
detector54=LocalSynchronizedCollection|true
detector55=ParallelLists|false
detector56=ArrayBasedCollections|true
detector55=ManualArrayCopy|true
detector139=JDBCVendorReliance|true
detector54=QuestionableBooleanAssignment|true
detector138=FinalParameters|true
detector53=ParallelLists|false
detector137=PossibleMemoryBloat|true
detector52=FindUninitializedGet|true
detector136=FindNonShortCircuit|true
detector51=CyclomaticComplexity|true
detector135=StartInConstructor|true
detector50=ClassEnvy|false
detector134=TrainUnconditionalDerefParams|true
detector133=FindTwoLockWait|true
detector132=NonCollectionMethodUse|true
detector131=DuplicateBranches|true
detector130=FindCircularDependencies|false
detector49=LocalSynchronizedCollection|true
detector48=FindFloatEquality|true
detector47=SuspiciousWaitOnConcurrentObject|true
detector46=PartiallyConstructedObjectAccess|true
detector45=BadAppletConstructor|false
detector129=StaticMethodInstanceInvocation|true
detector44=FindBadEqualsImplementation|false
detector128=UselessSubclassMethod|false
detector43=FindFieldSelfAssignment|true
detector127=CheckCalls|false
detector42=IDivResultCastToDouble|true
detector126=LazyInit|true
detector41=InefficientStringBuffering|true
detector40=FindUselessControlFlow|true
detector125=FindSpinLoop|true
detector124=RedundantMethodCalls|false
detector123=FindBadCast2|true
detector122=FindLocalSelfAssignment2|true
detector121=NeedlessAutoboxing|true
detector120=DubiousListCollection|true
detector39=NoteNonNullAnnotations|true
detector38=NonRecycleableTaglibs|true
detector37=ListIndexedIterating|true
detector36=FindEmptySynchronizedBlock|true
detector35=Section508Compliance|true
detector34=XMLFactoryBypass|true
detector119=CalledMethods|true
detector33=SpuriousThreadStates|true
detector118=ConstantListIndex|false
detector32=WaitInLoop|true
detector117=FindNullDeref|true
detector31=BloatedSynchronizedBlock|true
detector116=CloneIdiom|true
detector30=InstantiateStaticClass|true
detector115=UseEnumCollections|true
detector114=NoteSuppressedWarnings|true
detector113=DateComparison|true
detector112=FindRefComparison|true
detector111=ComparatorIdiom|true
detector110=VolatileUsage|true
detector57=ManualArrayCopy|true
detector58=QuestionableBooleanAssignment|true
detector59=UnreadFields|true
detector5=DontCatchIllegalMonitorStateException|true
detector60=FindReturnRef|false
detector61=WrongMapIterator|true
detector62=SyncCollectionIterators|true
detector63=UnnecessaryMath|true
detector64=SQLInLoop|true
detector65=PreferZeroLengthArrays|true
detector66=TrainFieldStoreTypes|true
detector67=FindBadCast|false
detector68=SerializableIdiom|false
detector69=ConfusedInheritance|true
detector6=FindNonSerializableStoreIntoSession|true
detector70=FindSleepWithLockHeld|true
detector71=SuperfluousInstanceOf|true
detector72=DumbMethodInvocations|true
detector73=LoadOfKnownNullValue|true
detector74=FindUnsatisfiedObligation|false
detector75=FindDeadLocalStores|true
detector76=InefficientToArray|true
detector77=InheritanceUnsafeGetResource|true
detector78=CustomBuiltXML|true
detector79=Naming|true
detector7=DeclaredRuntimeException|true
detector80=BadUseOfReturnValue|true
detector81=MutableStaticFields|true
detector82=BadResultSetAccess|true
detector83=UseToArray|true
detector84=ConfusionBetweenInheritedAndOuterMethod|true
detector85=NoteJCIPAnnotation|true
detector86=UnrelatedCollectionContents|true
detector87=InfiniteRecursiveLoop|true
detector88=RuntimeExceptionCapture|true
detector89=UnnecessaryStoreBeforeReturn|false
detector8=FindUnsyncGet|true
detector90=SuspiciousThreadInterrupted|true
detector91=CopiedOverriddenMethod|true
detector92=InheritanceTypeChecking|false
detector93=IteratorIdioms|true
detector94=InefficientMemberAccess|false
detector95=FindDoubleCheck|true
detector96=Methods|true
detector97=FindOpenStream|true
detector98=TrainNonNullAnnotations|true
detector99=FindMismatchedWaitOrNotify|true
detector9=BCPMethodReturnCheck|false
detector_threshold=2
filter_settings=Medium|PERFORMANCE,CORRECTNESS,MT_CORRECTNESS,BAD_PRACTICE,MALICIOUS_CODE,STYLE|false
filter_settings_neg=I18N|
\ No newline at end of file
#Tue Oct 03 15:07:33 CEST 2006
#Sat Jan 13 11:52:17 CET 2007
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
......@@ -17,7 +17,7 @@ org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
......
#Tue Apr 11 23:11:33 CEST 2006
#Sun Feb 11 10:22:10 CET 2007
comment_clear_blank_lines=true
comment_format_comments=true
comment_format_header=true
......@@ -10,7 +10,7 @@ comment_line_length=90
comment_new_line_for_parameter=false
comment_separate_root_tags=false
eclipse.preferences.version=1
formatter_settings_version=10
formatter_settings_version=11
internal.default.compliance=default
org.eclipse.jdt.ui.exception.name=e
org.eclipse.jdt.ui.gettersetter.use.is=true
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bytecode Outline Plug-in
Bundle-SymbolicName: de.loskutov.BytecodeOutline;singleton:=true
Bundle-Version: 2.2.4
Bundle-Version: 2.2.5
Bundle-ClassPath: .,
lib/asm-3.1.jar,
lib/asm-analysis-3.1.jar,
......@@ -16,7 +16,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.ui.editors,
org.eclipse.core.runtime,
org.eclipse.jface.text,
org.eclipse.jdt.core,
org.eclipse.jdt.core;bundle-version="3.4.0",
org.eclipse.ui.workbench.texteditor,
org.eclipse.jdt.ui,
org.eclipse.ui.ide,
......@@ -27,5 +27,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.jdt.debug.ui,
org.eclipse.debug.ui,
org.eclipse.jdt.debug,
org.junit;resolution:=optional
org.junit;resolution:=optional,
org.eclipse.core.net
Eclipse-LazyStart: true
plugin.id=de.loskutov.BytecodeOutline
plugin.version=2.2.4
plugin.version=2.2.5
bin.includes = LICENSE.txt,\
README.txt,\
......
......@@ -240,4 +240,13 @@
<adapter type="org.eclipse.debug.ui.actions.IToggleBreakpointsTarget"/>
</factory>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
category="org.eclipse.jdt.ui.preferences.JavaBasePreferencePage"
class="de.loskutov.bco.preferences.BCOPreferencePage"
id="de.loskutov.ByteCodeOutline.page"
name="Bytecode Outline">
</page>
</extension>
</plugin>
......@@ -2,7 +2,7 @@
<feature
id="de.loskutov.BytecodeOutline.feature"
label="Bytecode Outline"
version="2.2.4"
version="2.2.5"
provider-name="Andrei Loskutov">
<description url="http://asm.objectweb.org/eclipse/bco/index.html">
......@@ -38,10 +38,8 @@ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS&apos;&apos; AND
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.jface.text"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
<import plugin="org.eclipse.jdt.ui"/>
<import plugin="org.eclipse.core.resources" version="3.4.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.compare"/>
<import plugin="org.eclipse.ui.console"/>
......@@ -49,16 +47,16 @@ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS&apos;&apos; AND
<import plugin="org.eclipse.help.appserver"/>
<import plugin="org.eclipse.jdt.debug.ui"/>
<import plugin="org.eclipse.debug.ui"/>
<import plugin="org.eclipse.debug.core"/>
<import plugin="org.eclipse.jdt.debug"/>
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.jdt.core" version="3.4.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.net"/>
</requires>
<plugin
id="de.loskutov.BytecodeOutline"
download-size="650"
install-size="650"
version="0.0.0"
version="2.2.5"
unpack="false"/>
</feature>
......@@ -21,8 +21,12 @@ 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.defaultsGroup=Default selections for Bytecode Outline view
BCOPreferencePage.showVariables=Show Variables
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
......@@ -31,7 +35,15 @@ 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 view to editor
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)
......
......@@ -118,24 +118,24 @@ public interface BCOConstants {
* Key is Integer value from one of F_* constants, value is the String value of one of corresponding
* preference keys. It is not intended that the map would be modified by clients.
*/
Map/*<Integer,String>*/ FLAG_TO_NAME_MAP = new ConstantsMap();
Map/*<Integer,String>*/ NAME_TO_FLAG_MAP = new ConstantsMap();
final class ConstantsMap extends HashMap {
private static final long serialVersionUID = 1L;
private ConstantsMap() {
super();
put(Integer.valueOf(F_EXPAND_STACKMAP), EXPAND_STACKMAP);
put(Integer.valueOf(F_LINK_VIEW_TO_EDITOR), LINK_VIEW_TO_EDITOR);
put(Integer.valueOf(F_RECALCULATE_STACKMAP), RECALCULATE_STACKMAP);
put(Integer.valueOf(F_SHOW_ANALYZER), SHOW_ANALYZER);
put(Integer.valueOf(F_SHOW_ASMIFIER_CODE), SHOW_ASMIFIER_CODE);
put(Integer.valueOf(F_SHOW_HEX_VALUES), SHOW_HEX_VALUES);
put(Integer.valueOf(F_SHOW_LINE_INFO), SHOW_LINE_INFO);
put(Integer.valueOf(F_SHOW_ONLY_SELECTED_ELEMENT), SHOW_ONLY_SELECTED_ELEMENT);
put(Integer.valueOf(F_SHOW_RAW_BYTECODE), SHOW_RAW_BYTECODE);
put(Integer.valueOf(F_SHOW_STACKMAP), SHOW_STACKMAP);
put(Integer.valueOf(F_SHOW_VARIABLES), SHOW_VARIABLES);
put(EXPAND_STACKMAP, Integer.valueOf(F_EXPAND_STACKMAP));
put(LINK_VIEW_TO_EDITOR, Integer.valueOf(F_LINK_VIEW_TO_EDITOR));
put(RECALCULATE_STACKMAP, Integer.valueOf(F_RECALCULATE_STACKMAP));
put(SHOW_ANALYZER, Integer.valueOf(F_SHOW_ANALYZER));
put(SHOW_ASMIFIER_CODE, Integer.valueOf(F_SHOW_ASMIFIER_CODE));
put(SHOW_HEX_VALUES, Integer.valueOf(F_SHOW_HEX_VALUES));
put(SHOW_LINE_INFO, Integer.valueOf(F_SHOW_LINE_INFO));
put(SHOW_ONLY_SELECTED_ELEMENT, Integer.valueOf(F_SHOW_ONLY_SELECTED_ELEMENT));
put(SHOW_RAW_BYTECODE, Integer.valueOf(F_SHOW_RAW_BYTECODE));
put(SHOW_STACKMAP, Integer.valueOf(F_SHOW_STACKMAP));
put(SHOW_VARIABLES, Integer.valueOf(F_SHOW_VARIABLES));
}
}
}
package de.loskutov.bco.preferences;
import org.eclipse.jface.preference.*;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import de.loskutov.bco.BytecodeOutlinePlugin;
/**
* This class represents a preference page that is contributed to the
* Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>,
* we can use the field support built into JFace that allows us to create a page
* that is small and knows how to save, restore and apply itself.
* This class represents a preference page that is contributed to the Preferences dialog.
* By subclassing <samp>FieldEditorPreferencePage</samp>, we can use the field support
* built into JFace that allows us to create a page that is small and knows how to save,
* restore and apply itself.
* <p>
* This page is used to modify preferences only. They are stored in the
* preference store that belongs to the main plug-in class. That way,
* preferences can be accessed directly via the preference store.
* This page is used to modify preferences only. They are stored in the preference store
* that belongs to the main plug-in class. That way, preferences can be accessed directly
* via the preference store.
*/
public class BCOPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
public class BCOPreferencePage extends FieldEditorPreferencePage
implements
IWorkbenchPreferencePage {
private Group rateGroup;
public BCOPreferencePage() {
super( GRID );
setPreferenceStore(BytecodeOutlinePlugin.getDefault()
public BCOPreferencePage() {
super(GRID);
setPreferenceStore(BytecodeOutlinePlugin.getDefault()
.getPreferenceStore());
setDescription(BytecodeOutlinePlugin.getResourceString("BCOPreferencePage.defaultsGroup"));
}
/*
* Creates the field editors. Field editors are abstractions of the common GUI
* blocks needed to manipulate various types of preferences. Each field editor
* knows how to save and restore itself.
*/
public void createFieldEditors() {
addField( new BooleanFieldEditor( BCOConstants.LINK_VIEW_TO_EDITOR,
BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.linkViewToEditor" ), //$NON-NLS-1$
getFieldEditorParent() ) );
addField( new BooleanFieldEditor( BCOConstants.SHOW_ONLY_SELECTED_ELEMENT,
BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.showOnlySelected" ), //$NON-NLS-1$
getFieldEditorParent() ) );
addField( new BooleanFieldEditor( BCOConstants.SHOW_RAW_BYTECODE,
BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.showRawBytecode" ), //$NON-NLS-1$
getFieldEditorParent() ) );
addField( new BooleanFieldEditor( BCOConstants.SHOW_ASMIFIER_CODE,
BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.showAsmifierCode" ), //$NON-NLS-1$
getFieldEditorParent() ) );
addField( new BooleanFieldEditor( BCOConstants.SHOW_ANALYZER,
BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.showAnalyzer" ), //$NON-NLS-1$
getFieldEditorParent() ) );
//
addField( new BooleanFieldEditor( BCOConstants.SHOW_LINE_INFO,
BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.showLineInfo" ), //$NON-NLS-1$
getFieldEditorParent() ) );
addField( new BooleanFieldEditor( BCOConstants.SHOW_VARIABLES,
BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.showVariables" ), //$NON-NLS-1$
getFieldEditorParent() ) );
addField( new BooleanFieldEditor( BCOConstants.SHOW_STACKMAP,
BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.showStackMap" ), //$NON-NLS-1$
getFieldEditorParent() ) );
addField( new BooleanFieldEditor( BCOConstants.EXPAND_STACKMAP,
BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.expandStackMap" ), //$NON-NLS-1$
getFieldEditorParent() ) );
// addField( new BooleanFieldEditor( BCOConstants.RECALCULATE_STACKMAP,
// BytecodeOutlinePlugin.getResourceString( "BCOPreferencePage.recalculateStackMap" ), //$NON-NLS-1$
// getFieldEditorParent() ) );
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
public void init( IWorkbench workbench ) {
//
}
setDescription(BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.description"));
}
public void setVisible(boolean visible) {
super.setVisible(visible);
}
protected void adjustGridLayout() {
super.adjustGridLayout();
// ((GridData)rateGroup.getLayoutData()).horizontalSpan = 2;
}
/*
* Creates the field editors. Field editors are abstractions of the common GUI blocks
* needed to manipulate various types of preferences. Each field editor knows how to
* save and restore itself.
*/
public void createFieldEditors() {
Composite fieldEditorParent = getFieldEditorParent();
TabFolder tabFolder = new TabFolder(fieldEditorParent, SWT.TOP);
tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
TabItem tabPrefs = new TabItem(tabFolder, SWT.NONE);
tabPrefs.setText(BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.defaultsGroup"));
TabItem tabCompare = new TabItem(tabFolder, SWT.NONE);
tabCompare.setText(BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.compareGroup"));
TabItem tabMisc = new TabItem(tabFolder, SWT.NONE);
tabMisc.setText(BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.miscGroup"));
Group viewGroup = new Group(tabFolder, SWT.NONE);
viewGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
tabPrefs.setControl(viewGroup);
Group compareGroup = new Group(tabFolder, SWT.NONE);
compareGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
tabCompare.setControl(compareGroup);
rateGroup = new Group(tabFolder, SWT.NONE);
GridData gridData = new GridData(GridData.FILL_BOTH);
GridLayout layout = new GridLayout();
layout.numColumns = 1;
rateGroup.setLayout(layout);
rateGroup.setLayoutData(gridData);
tabMisc.setControl(rateGroup);
RateIt.createTextArea(rateGroup);
addField(new BooleanFieldEditor(
BCOConstants.LINK_VIEW_TO_EDITOR, BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.linkViewToEditor"),
viewGroup));
addField(new BooleanFieldEditor(
BCOConstants.LINK_REF_VIEW_TO_EDITOR, BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.linkRefViewToEditor"),
viewGroup));
addField(new BooleanFieldEditor(
BCOConstants.SHOW_ONLY_SELECTED_ELEMENT, BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.showOnlySelected"),
viewGroup));
addField(new BooleanFieldEditor(
BCOConstants.SHOW_RAW_BYTECODE, BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.showRawBytecode"),
viewGroup));
addField(new BooleanFieldEditor(
BCOConstants.SHOW_ASMIFIER_CODE, BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.showAsmifierCode"),
viewGroup));
addField(new BooleanFieldEditor(
BCOConstants.SHOW_ANALYZER, BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.showAnalyzer"), viewGroup));
addField(new BooleanFieldEditor(
BCOConstants.SHOW_LINE_INFO, BytecodeOutlinePlugin
.getResourceString("BCOPreferencePage.showLineInfo"), viewGroup));
addField(new BooleanFieldEditor(
BCOConstants.SHOW_VARIABLES, BytecodeOutlinePlugin