Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » (DLTK Newbie) Creating new script editor: NPE
(DLTK Newbie) Creating new script editor: NPE [message #496073] Sat, 07 November 2009 20:10 Go to next message
Michael Alexander is currently offline Michael Alexander
Messages: 1
Registered: November 2009
Junior Member
Hi All,

I'm writing a new development environment for UnrealScript (Epic just released a free version of Unreal Engine 3), following the really helpful guide http://wiki.eclipse.org/A_guide_to_building_a_DLTK-based_lan guage_IDE . I've really hit a wall creating the editor with a NPE when I try to open a new .uc file using my UnrealScriptEditor.

The NPE is posted at the bottom of this message. I've tried to attach all of the relevant classes (there are more as you can see from plugin.xml). I've been stuck on this for days now to no avail, I hope it's a simple config thing that is easy to spot either in plugin.xml or UnrealScriptEditor.java, but I'm at my wits' end Sad

Any help is hugely appreciated, thanks in advance.

***** plugin.xml *****

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
  <extension
        id="nature"
        point="org.eclipse.core.resources.natures">
     <runtime>
        <run 
           class="org.eclipse.dltk.unrealscript.UnrealScriptNature">
        </run>
     </runtime>
  </extension>
  <extension
        point="org.eclipse.core.runtime.contentTypes">
     <content-type
           base-type="org.eclipse.core.runtime.text"
           describer="org.eclipse.dltk.unrealscript.UnrealScriptContentDescriber"
           file-extensions="uc"
           id="org.eclipse.dltk.unrealscript.content-type"
           name="UnrealScript File"
           priority="high">
     </content-type>
  </extension>
  <extension
        point="org.eclipse.dltk.core.language">
     <language
           class="org.eclipse.dltk.unrealscript.UnrealScriptLanguageToolkit"
           nature="org.eclipse.dltk.unrealscript.nature"
           priority="0">
     </language>
  </extension>
  <extension
        point="org.eclipse.ui.newWizards">
     <wizard
           category="org.eclipse.dltk.unrealscript.category"
           class="org.eclipse.dltk.unrealscript.UnrealScriptProjectWizard:org.eclipse.dltk.unrealscript.nature"
           icon="unreal_logo_small.png"
           id="org.eclipse.dltk.unrealscript.wizard"
           name="UnrealScript Project"
           project="true">
     </wizard>
     <category
           id="org.eclipse.dltk.unrealscript.category"
           name="UnrealScript">
     </category>
  </extension>
  <extension
        point="org.eclipse.dltk.ui.language">
     <language
           class="org.eclipse.dltk.unrealscript.UnrealScriptUILanguageToolkit"
           nature="org.eclipse.dltk.unrealscript.nature"
           priority="0">
     </language>
  </extension>
  <extension
        point="org.eclipse.ui.editors">
     <editor
           class="org.eclipse.dltk.unrealscript.UnrealScriptEditor"
           default="false"
           icon="unreal_logo_small.png"
           id="org.eclipse.dltk.unrealscript.editor"
           name="UnrealScript Editor">
        <contentTypeBinding
              contentTypeId="org.eclipse.dltk.unrealscript.content-type">
        </contentTypeBinding>
     </editor>
  </extension>

</plugin>


***** UnrealScriptEditor.java *****

package org.eclipse.dltk.unrealscript;

import org.eclipse.dltk.core.IDLTKLanguageToolkit;
import org.eclipse.dltk.internal.ui.editor.ScriptEditor;
import org.eclipse.jface.preference.IPreferenceStore;

public class UnrealScriptEditor extends ScriptEditor {
       public static final String EDITOR_ID = "org.eclipse.dltk.unrealscript.editor";
       public static final String EDITOR_CONTEXT = "#UnrealScriptEditorContext";

       protected void initialiseEditor() {
               super.initializeEditor();
               setEditorContextMenuId(EDITOR_CONTEXT);
       }

       @Override
       public String getEditorId() {
               return EDITOR_ID;
       }

       @Override
       public IDLTKLanguageToolkit getLanguageToolkit() {
               return UnrealScriptLanguageToolkit.getDefault();
       }

       @Override
       protected IPreferenceStore getScriptPreferenceStore() {
               return UnrealScript.getDefault().getPreferenceStore();
       }

}


***** UnrealScriptContentDescriber.java *****

package org.eclipse.dltk.unrealscript;

import java.util.regex.Pattern;

import org.eclipse.dltk.core.ScriptContentDescriber;

public class UnrealScriptContentDescriber extends ScriptContentDescriber {
       public UnrealScriptContentDescriber() {
       }

       protected static Pattern[] header_patterns = {
               Pattern.compile("^#!.*unrealscript.*", Pattern.MULTILINE)
       };

       @Override
       protected Pattern[] getHeaderPatterns() {
               return header_patterns;
       }

}


***** UnrealScript.java *****

package org.eclipse.dltk.unrealscript;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
 * The activator class controls the plug-in life cycle
 */
public class UnrealScript extends AbstractUIPlugin {

       // The plug-in ID
       public static final String PLUGIN_ID = "org.eclipse.dltk.unrealscript";

       // The shared instance
       private static UnrealScript plugin;

       /**
        * The constructor
        */
       public UnrealScript() {
       }

       /*
        * (non-Javadoc)
        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
        */
       public void start(BundleContext context) throws Exception {
               super.start(context);
               plugin = this;
       }

       /*
        * (non-Javadoc)
        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
        */
       public void stop(BundleContext context) throws Exception {
               plugin = null;
               super.stop(context);
       }

       /**
        * Returns the shared instance
        *
        * @return the shared instance
        */
       public static UnrealScript getDefault() {
               return plugin;
       }

}


***** UnrealScriptLanguageToolkit.java *****

package org.eclipse.dltk.unrealscript;

import org.eclipse.dltk.core.AbstractLanguageToolkit;
import org.eclipse.dltk.core.IDLTKLanguageToolkit;

public class UnrealScriptLanguageToolkit extends AbstractLanguageToolkit {
       private static UnrealScriptLanguageToolkit toolkit;

       public static IDLTKLanguageToolkit getDefault() {
               if (toolkit == null) {
                       toolkit = new UnrealScriptLanguageToolkit();
               }
               return toolkit;
       }

       @Override
       public String getLanguageContentType() {
               return "org.eclipse.dltk.unrealscript.content-type";
       }

       @Override
       public String getLanguageName() {
               return "UnrealScript";
       }

       @Override
       public String getNatureId() {
               return UnrealScriptNature.UNREALSCRIPT_NATURE;
       }

}


***** UnrealScriptNature.java *****

package org.eclipse.dltk.unrealscript;

import org.eclipse.dltk.core.ScriptNature;

public class UnrealScriptNature extends ScriptNature {
       public static final String UNREALSCRIPT_NATURE =
UnrealScript.PLUGIN_ID + ".nature";
}


***** .log *****

!ENTRY org.eclipse.ui 4 0 2009-11-08 10:21:57.019
!MESSAGE An unexpected exception was thrown.
!STACK 0
java.lang.NullPointerException
       at org.eclipse.dltk.internal.ui.editor.ScriptEditor$AdaptedSourceViewer.unconfigure(ScriptEditor.java:408)
       at org.eclipse.jface.text.source.SourceViewer.handleDispose(SourceViewer.java:667)
       at org.eclipse.jface.text.source.projection.ProjectionViewer.handleDispose(ProjectionViewer.java:1362)
       at org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer.handleDispose(ScriptSourceViewer.java:450)
       at org.eclipse.jface.text.TextViewer$2.widgetDisposed(TextViewer.java:1788)
       at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:117)
       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
       at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)
       at org.eclipse.swt.custom.StyledText.handleDispose(StyledText.java:5712)
       at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5540)
       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)
       at org.eclipse.swt.widgets.Widget.release(Widget.java:804)
       at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:756)
       at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:174)
       at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
       at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:756)
       at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
       at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:756)
       at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
       at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:756)
       at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
       at org.eclipse.swt.widgets.Widget.dispose(Widget.java:441)
       at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:687)
       at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
       at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
       at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
       at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
       at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
       at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
       at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
       at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
       at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
       at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608)
       at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
       at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
       at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
       at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
       at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
       at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
       at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
       at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
       at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
       at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
       at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2854)
       at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
       at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
       at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
       at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
       at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
       at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
       at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
       at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
       at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
       at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:361)
       at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
       at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
       at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
       at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
       at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
       at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
       at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
       at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
       at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842)
       at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
       at org.eclipse.core.runtime.Platform.run(Platform.java:888)
       at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
       at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
       at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840)
       at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101)
       at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205)
       at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
       at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
       at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
       at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
       at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
       at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
       at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
       at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
       at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
       at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

!ENTRY org.eclipse.ui 4 0 2009-11-08 10:21:57.021
!MESSAGE Unable to create editor ID
org.eclipse.dltk.unrealscript.editor: An unexpected exception was
thrown.
!STACK 0
java.lang.NullPointerException
       at org.eclipse.dltk.internal.ui.editor.ScriptEditor$AdaptedSourceViewer.configure(ScriptEditor.java:403)
       at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3322)
       at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53)
       at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:427)
       at org.eclipse.dltk.internal.ui.editor.ScriptEditor.createPartControl(ScriptEditor.java:1750)
       at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662)
       at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
       at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
       at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
       at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
       at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
       at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
       at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
       at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
       at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
       at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608)
       at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
       at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
       at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
       at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
       at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
       at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
       at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
       at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
       at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
       at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
       at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2854)
       at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
       at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
       at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
       at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
       at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
       at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
       at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
       at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
       at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
       at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:361)
       at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
       at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
       at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
       at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
       at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
       at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
       at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
       at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
       at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842)
       at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
       at org.eclipse.core.runtime.Platform.run(Platform.java:888)
       at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
       at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
       at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840)
       at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101)
       at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205)
       at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
       at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
       at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
       at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
       at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
       at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
       at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
       at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
       at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
       at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Re: (DLTK Newbie) Creating new script editor: NPE [message #496326 is a reply to message #496073] Mon, 09 November 2009 12:41 Go to previous messageGo to next message
Alex Panchenko is currently offline Alex Panchenko
Messages: 342
Registered: July 2009
Senior Member
Hi Michael,

You should also implement the "public ScriptTextTools getTextTools()"
method of your editor.
I'll update the manual shortly.

Regards,
Alex

Michael Alexander wrote:
> Hi All,
>
> I'm writing a new development environment for UnrealScript (Epic just
> released a free version of Unreal Engine 3), following the really
> helpful guide
> http://wiki.eclipse.org/A_guide_to_building_a_DLTK-based_lan guage_IDE .
> I've really hit a wall creating the editor with a NPE when I try to open
> a new .uc file using my UnrealScriptEditor.
>
> The NPE is posted at the bottom of this message. I've tried to attach
> all of the relevant classes (there are more as you can see from
> plugin.xml). I've been stuck on this for days now to no avail, I hope
> it's a simple config thing that is easy to spot either in plugin.xml or
> UnrealScriptEditor.java, but I'm at my wits' end :(
>
> Any help is hugely appreciated, thanks in advance.
>
> ***** plugin.xml *****
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.4"?>
> <plugin>
> <extension
> id="nature"
> point="org.eclipse.core.resources.natures">
> <runtime>
> <run
> class="org.eclipse.dltk.unrealscript.UnrealScriptNature">
> </run>
> </runtime>
> </extension>
> <extension
> point="org.eclipse.core.runtime.contentTypes">
> <content-type
> base-type="org.eclipse.core.runtime.text"
>
> describer="org.eclipse.dltk.unrealscript.UnrealScriptContentDescriber "
> file-extensions="uc"
> id="org.eclipse.dltk.unrealscript.content-type"
> name="UnrealScript File"
> priority="high">
> </content-type>
> </extension>
> <extension
> point="org.eclipse.dltk.core.language">
> <language
> class="org.eclipse.dltk.unrealscript.UnrealScriptLanguageToolkit "
> nature="org.eclipse.dltk.unrealscript.nature"
> priority="0">
> </language>
> </extension>
> <extension
> point="org.eclipse.ui.newWizards">
> <wizard
> category="org.eclipse.dltk.unrealscript.category"
>
> class=" org.eclipse.dltk.unrealscript.UnrealScriptProjectWizard:org. eclipse.dltk.unrealscript.nature "
>
> icon="unreal_logo_small.png"
> id="org.eclipse.dltk.unrealscript.wizard"
> name="UnrealScript Project"
> project="true">
> </wizard>
> <category
> id="org.eclipse.dltk.unrealscript.category"
> name="UnrealScript">
> </category>
> </extension>
> <extension
> point="org.eclipse.dltk.ui.language">
> <language
>
> class="org.eclipse.dltk.unrealscript.UnrealScriptUILanguageToolkit "
> nature="org.eclipse.dltk.unrealscript.nature"
> priority="0">
> </language>
> </extension>
> <extension
> point="org.eclipse.ui.editors">
> <editor
> class="org.eclipse.dltk.unrealscript.UnrealScriptEditor"
> default="false"
> icon="unreal_logo_small.png"
> id="org.eclipse.dltk.unrealscript.editor"
> name="UnrealScript Editor">
> <contentTypeBinding
> contentTypeId="org.eclipse.dltk.unrealscript.content-type">
> </contentTypeBinding>
> </editor>
> </extension>
>
> </plugin>
>
> ***** UnrealScriptEditor.java *****
>
> package org.eclipse.dltk.unrealscript;
>
> import org.eclipse.dltk.core.IDLTKLanguageToolkit;
> import org.eclipse.dltk.internal.ui.editor.ScriptEditor;
> import org.eclipse.jface.preference.IPreferenceStore;
>
> public class UnrealScriptEditor extends ScriptEditor {
> public static final String EDITOR_ID =
> "org.eclipse.dltk.unrealscript.editor";
> public static final String EDITOR_CONTEXT =
> "#UnrealScriptEditorContext";
>
> protected void initialiseEditor() {
> super.initializeEditor();
> setEditorContextMenuId(EDITOR_CONTEXT);
> }
>
> @Override
> public String getEditorId() {
> return EDITOR_ID;
> }
>
> @Override
> public IDLTKLanguageToolkit getLanguageToolkit() {
> return UnrealScriptLanguageToolkit.getDefault();
> }
>
> @Override
> protected IPreferenceStore getScriptPreferenceStore() {
> return UnrealScript.getDefault().getPreferenceStore();
> }
>
> }
>
> ***** UnrealScriptContentDescriber.java *****
>
> package org.eclipse.dltk.unrealscript;
>
> import java.util.regex.Pattern;
>
> import org.eclipse.dltk.core.ScriptContentDescriber;
>
> public class UnrealScriptContentDescriber extends ScriptContentDescriber {
> public UnrealScriptContentDescriber() {
> }
>
> protected static Pattern[] header_patterns = {
> Pattern.compile("^#!.*unrealscript.*", Pattern.MULTILINE)
> };
>
> @Override
> protected Pattern[] getHeaderPatterns() {
> return header_patterns;
> }
>
> }
>
> ***** UnrealScript.java *****
>
> package org.eclipse.dltk.unrealscript;
>
> import org.eclipse.ui.plugin.AbstractUIPlugin;
> import org.osgi.framework.BundleContext;
>
> /**
> * The activator class controls the plug-in life cycle
> */
> public class UnrealScript extends AbstractUIPlugin {
>
> // The plug-in ID
> public static final String PLUGIN_ID =
> "org.eclipse.dltk.unrealscript";
>
> // The shared instance
> private static UnrealScript plugin;
>
> /**
> * The constructor
> */
> public UnrealScript() {
> }
>
> /*
> * (non-Javadoc)
> * @see
> org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framew ork.BundleContext)
>
> */
> public void start(BundleContext context) throws Exception {
> super.start(context);
> plugin = this;
> }
>
> /*
> * (non-Javadoc)
> * @see
> org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framewo rk.BundleContext)
>
> */
> public void stop(BundleContext context) throws Exception {
> plugin = null;
> super.stop(context);
> }
>
> /**
> * Returns the shared instance
> *
> * @return the shared instance
> */
> public static UnrealScript getDefault() {
> return plugin;
> }
>
> }
>
> ***** UnrealScriptLanguageToolkit.java *****
>
> package org.eclipse.dltk.unrealscript;
>
> import org.eclipse.dltk.core.AbstractLanguageToolkit;
> import org.eclipse.dltk.core.IDLTKLanguageToolkit;
>
> public class UnrealScriptLanguageToolkit extends AbstractLanguageToolkit {
> private static UnrealScriptLanguageToolkit toolkit;
>
> public static IDLTKLanguageToolkit getDefault() {
> if (toolkit == null) {
> toolkit = new UnrealScriptLanguageToolkit();
> }
> return toolkit;
> }
>
> @Override
> public String getLanguageContentType() {
> return "org.eclipse.dltk.unrealscript.content-type";
> }
>
> @Override
> public String getLanguageName() {
> return "UnrealScript";
> }
>
> @Override
> public String getNatureId() {
> return UnrealScriptNature.UNREALSCRIPT_NATURE;
> }
>
> }
>
> ***** UnrealScriptNature.java *****
>
> package org.eclipse.dltk.unrealscript;
>
> import org.eclipse.dltk.core.ScriptNature;
>
> public class UnrealScriptNature extends ScriptNature {
> public static final String UNREALSCRIPT_NATURE =
> UnrealScript.PLUGIN_ID + ".nature";
> }
>
> ***** .log *****
>
> !ENTRY org.eclipse.ui 4 0 2009-11-08 10:21:57.019
> !MESSAGE An unexpected exception was thrown.
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.dltk.internal.ui.editor.ScriptEditor$AdaptedSour ceViewer.unconfigure(ScriptEditor.java:408)
>
> at
> org.eclipse.jface.text.source.SourceViewer.handleDispose(Sou rceViewer.java:667)
>
> at
> org.eclipse.jface.text.source.projection.ProjectionViewer.ha ndleDispose(ProjectionViewer.java:1362)
>
> at
> org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer.handl eDispose(ScriptSourceViewer.java:450)
>
> at
> org.eclipse.jface.text.TextViewer$2.widgetDisposed(TextViewe r.java:1788)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:117)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:7 70)
> at
> org.eclipse.swt.custom.StyledText.handleDispose(StyledText.j ava:5712)
> at
> org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.j ava:5540)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)
> at org.eclipse.swt.widgets.Widget.release(Widget.java:804)
> at
> org.eclipse.swt.widgets.Composite.releaseChildren(Composite. java:756)
> at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:1 74)
> at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
> at
> org.eclipse.swt.widgets.Composite.releaseChildren(Composite. java:756)
> at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
> at
> org.eclipse.swt.widgets.Composite.releaseChildren(Composite. java:756)
> at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
> at
> org.eclipse.swt.widgets.Composite.releaseChildren(Composite. java:756)
> at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
> at org.eclipse.swt.widgets.Widget.dispose(Widget.java:441)
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:687)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:462)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:595)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:31 3)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:180)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:270)
>
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
>
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:473)
>
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
>
> at
> org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
> at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 08)
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
> at
> org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:225)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:213)
>
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:778)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:677)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:638)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2854)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2762)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2754)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2705)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2701)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2685)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2676)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:361)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:168)
>
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:22 9)
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:20 8)
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchR un(SelectionDispatchAction.java:274)
>
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(Selec tionDispatchAction.java:250)
>
> at
> org.eclipse.jdt.internal.ui.packageview.PackageExplorerActio nGroup.handleOpen(PackageExplorerActionGroup.java:373)
>
> at
> org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$ 4.open(PackageExplorerPart.java:526)
>
> at
> org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener. open(OpenAndLinkWithEditorHelper.java:48)
>
> at
> org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:842)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.runtime.Platform.run(Platform.java:888)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
> at
> org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:840)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1101)
>
> at
> org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1205)
>
> at
> org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:264)
> at
> org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:258)
> at
> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:298)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3880)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3473)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
>
> !ENTRY org.eclipse.ui 4 0 2009-11-08 10:21:57.021
> !MESSAGE Unable to create editor ID
> org.eclipse.dltk.unrealscript.editor: An unexpected exception was
> thrown.
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.dltk.internal.ui.editor.ScriptEditor$AdaptedSour ceViewer.configure(ScriptEditor.java:403)
>
> at
> org.eclipse.ui.texteditor.AbstractTextEditor.createPartContr ol(AbstractTextEditor.java:3322)
>
> at
> org.eclipse.ui.texteditor.StatusTextEditor.createPartControl (StatusTextEditor.java:53)
>
> at
> org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.create PartControl(AbstractDecoratedTextEditor.java:427)
>
> at
> org.eclipse.dltk.internal.ui.editor.ScriptEditor.createPartC ontrol(ScriptEditor.java:1750)
>
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:662)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:462)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:595)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:31 3)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:180)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:270)
>
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
>
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:473)
>
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
>
> at
> org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
> at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 08)
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
> at
> org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:225)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:213)
>
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:778)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:677)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:638)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2854)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2762)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2754)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2705)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2701)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2685)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2676)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:361)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:168)
>
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:22 9)
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:20 8)
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchR un(SelectionDispatchAction.java:274)
>
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(Selec tionDispatchAction.java:250)
>
> at
> org.eclipse.jdt.internal.ui.packageview.PackageExplorerActio nGroup.handleOpen(PackageExplorerActionGroup.java:373)
>
> at
> org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$ 4.open(PackageExplorerPart.java:526)
>
> at
> org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener. open(OpenAndLinkWithEditorHelper.java:48)
>
> at
> org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:842)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.runtime.Platform.run(Platform.java:888)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
> at
> org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:840)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1101)
>
> at
> org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1205)
>
> at
> org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:264)
> at
> org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:258)
> at
> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:298)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3880)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3473)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Re: (DLTK Newbie) Creating new script editor: NPE [message #548045 is a reply to message #496073] Tue, 20 July 2010 10:03 Go to previous message
Lance is currently offline Lance
Messages: 2
Registered: July 2010
Location: Dayton ohio
Junior Member
Did you make any progress with this? I am interested in using/helping, although I don't have any experience writing plugins for eclipse.

Lance Wellspring
Previous Topic:How manage Completion for Java Model with Freemarker script.
Next Topic:DLTK indexing annoyance in Zend Studio 7.2.1.v20100704
Goto Forum:
  


Current Time: Tue Jul 29 04:40:47 EDT 2014

Powered by FUDForum. Page generated in 0.02278 seconds