-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to most Java files to remove warning messages and to clean up
code. Major refactor of the RexxEditor file as this file now doesn't need to contain any references to the Content Outline page because this program now uses the proper method for instantiation. Added a RexxTokenListToken (because RexxToken was taken) and this allows for the syntax coloring to be dynamic as the token creates the TextAttribute every time it's called. Updates to other parts of the program to decouple code and allow syntax highlighting to be created dynamically.
- Loading branch information
1 parent
b274ce5
commit dad047f
Showing
35 changed files
with
287 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
bin/org/imperfectmommy/rexxeditor/contentassist/RexxFunctionProposalData.class
Binary file not shown.
Binary file added
BIN
+1.5 KB
bin/org/imperfectmommy/rexxeditor/contentoutliner/RexxOutlineAdapterFactory.class
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-116 Bytes
(98%)
bin/org/imperfectmommy/rexxeditor/editors/RexxConfiguration.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+4 Bytes
(100%)
bin/org/imperfectmommy/rexxeditor/editors/RexxPresentationReconciler.class
Binary file not shown.
Binary file modified
BIN
-46 Bytes
(98%)
bin/org/imperfectmommy/rexxeditor/launcher/ObjectRexxErrorParser.class
Binary file not shown.
Binary file modified
BIN
-289 Bytes
(90%)
bin/org/imperfectmommy/rexxeditor/launcher/RexxLaunchConfigurationDelegate.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
bin/org/imperfectmommy/rexxeditor/launcher/RexxLaunchConfigurationTab$5.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
bin/org/imperfectmommy/rexxeditor/launcher/RexxLaunchConfigurationTab$6.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
bin/org/imperfectmommy/rexxeditor/launcher/RexxLaunchConfigurationTab$7.class
Binary file not shown.
Binary file modified
BIN
-64 Bytes
(99%)
bin/org/imperfectmommy/rexxeditor/launcher/RexxLaunchConfigurationTab.class
Binary file not shown.
Binary file modified
BIN
-226 Bytes
(97%)
bin/org/imperfectmommy/rexxeditor/scanner/RexxLineScanner.class
Binary file not shown.
Binary file modified
BIN
-776 Bytes
(90%)
bin/org/imperfectmommy/rexxeditor/scanner/RexxTokenList.class
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
bin/org/imperfectmommy/rexxeditor/scanner/rules/RexxConstantRule.class
Binary file not shown.
Binary file modified
BIN
+21 Bytes
(100%)
bin/org/imperfectmommy/rexxeditor/scanner/tokenRules/VariableDefinitionRule.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/org/imperfectmommy/rexxeditor/contentoutliner/RexxOutlineAdapterFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.imperfectmommy.rexxeditor.contentoutliner; | ||
|
||
import org.eclipse.core.runtime.IAdapterFactory; | ||
import org.eclipse.ui.views.contentoutline.IContentOutlinePage; | ||
import org.imperfectmommy.rexxeditor.editors.RexxEditor; | ||
|
||
public class RexxOutlineAdapterFactory implements IAdapterFactory { | ||
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) { | ||
if (IContentOutlinePage.class.equals(adapterType)) { | ||
RexxEditor editor = (RexxEditor) adaptableObject; | ||
return (T) new RexxContentOutlinePage(editor.getDocumentProvider(), editor); | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public Class<?>[] getAdapterList() { | ||
return new Class<?>[] { IContentOutlinePage.class }; | ||
} | ||
|
||
} |
71 changes: 0 additions & 71 deletions
71
src/org/imperfectmommy/rexxeditor/editors/ColorManager.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 10 additions & 64 deletions
74
src/org/imperfectmommy/rexxeditor/editors/RexxEditor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,24 @@ | ||
package org.imperfectmommy.rexxeditor.editors; | ||
|
||
import java.util.ArrayList; | ||
|
||
import org.eclipse.core.runtime.CoreException; | ||
import org.eclipse.jface.util.IPropertyChangeListener; | ||
import org.eclipse.jface.util.PropertyChangeEvent; | ||
import org.eclipse.ui.IEditorInput; | ||
import org.eclipse.ui.editors.text.TextEditor; | ||
import org.eclipse.ui.views.contentoutline.IContentOutlinePage; | ||
import org.imperfectmommy.rexxeditor.Activator; | ||
import org.imperfectmommy.rexxeditor.contentoutliner.RexxContentElement; | ||
import org.imperfectmommy.rexxeditor.contentoutliner.RexxContentOutlinePage; | ||
import org.imperfectmommy.rexxeditor.preferences.RexxPreferencePage; | ||
|
||
public class RexxEditor extends TextEditor { | ||
private RexxContentOutlinePage fOutlinePage; | ||
private ColorManager colorManager; | ||
|
||
public RexxEditor() { | ||
super(); | ||
Activator plugin = Activator.getActivator(); | ||
this.colorManager = new ColorManager(plugin.getPreferenceStore()); | ||
this.setSourceViewerConfiguration(new RexxConfiguration(this.colorManager, this)); | ||
// setPreferenceStore(plugin.getPreferenceStore()); | ||
} | ||
|
||
@Override | ||
public void dispose() { | ||
this.colorManager.dispose(); | ||
if (this.fOutlinePage != null) { | ||
this.fOutlinePage.setInput(null); | ||
} | ||
super.dispose(); | ||
} | ||
|
||
@Override | ||
public void doSetInput(IEditorInput input) throws CoreException { | ||
super.doSetInput(input); | ||
|
||
if (this.fOutlinePage != null) { | ||
this.fOutlinePage.setInput(input); | ||
} | ||
} | ||
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
public <T> T getAdapter(Class<T> adapter) { | ||
if (IContentOutlinePage.class.equals(adapter)) { | ||
if (this.fOutlinePage == null) { | ||
this.fOutlinePage = new RexxContentOutlinePage(this.getDocumentProvider(), this); | ||
if (this.getEditorInput() != null) { | ||
this.fOutlinePage.setInput(this.getEditorInput()); | ||
} | ||
this.setSourceViewerConfiguration(new RexxConfiguration()); | ||
|
||
Activator.getActivator().getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() { | ||
|
||
@Override | ||
public void propertyChange(PropertyChangeEvent event) { | ||
getSourceViewer().invalidateTextPresentation(); | ||
handlePreferenceStoreChanged(event); | ||
} | ||
return (T) this.fOutlinePage; | ||
} | ||
return super.getAdapter(adapter); | ||
} | ||
|
||
@Override | ||
protected void handlePreferenceStoreChanged(PropertyChangeEvent event) { | ||
super.handlePreferenceStoreChanged(event); | ||
}); | ||
} | ||
|
||
public void update(ArrayList<RexxContentElement> updateList) { | ||
if (this.fOutlinePage != null) { | ||
this.fOutlinePage.update(updateList); | ||
} | ||
} | ||
|
||
/* | ||
* protected IVerticalRuler createVerticalRuler() { CompositeRuler ruler = new | ||
* CompositeRuler(); ruler.addDecorator(0, new | ||
* AnnotationRulerColumn(VERTICAL_RULER_WIDTH)); ruler.addDecorator(1, | ||
* createLineNumberRulerColumn()); return ruler; } | ||
*/ | ||
|
||
} |
Oops, something went wrong.