sharkman / cypal-studio

Automatically exported from code.google.com/p/cypal-studio
0 stars 0 forks source link

NullPointer when creating module #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. when creating a new Module
2. On a project : Right click, New->Other...-> Cypal Studio-> Module
3. package : com.foo.bar
4. Name : HelloWorld

What is the expected output? What do you see instead?

java.lang.NullPointerException
        at
in.cypal.studio.gwt.core.common.Util.createModuleEntry(Util.java:393)
        at
in.cypal.studio.gwt.ui.wizards.NewGwtModuleWizardPage.createType(NewGwtModuleWiz
ardPage.java:134)
        at
in.cypal.studio.gwt.ui.wizards.NewGwtModuleWizard.performFinish(NewGwtModuleWiza
rd.java:74)
        at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
        at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
        at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
        at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
        at org.eclipse.jface.window.Window.open(Window.java:796)
        at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
        at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionCont
ributionItem.java:546)
        at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.
java:490)

What version of the product are you using? On what operating system?

Using RC4 with google gwt 1.4.60, on Linux x86, distro : ubuntu 7.04, using
eclipse europa 3.3 with J2EE

Original issue reported on code.google.com by t.bussie...@gmail.com on 3 Dec 2007 at 10:04

GoogleCodeExporter commented 9 years ago
I've downloaded the source code and  started the plugin in Debug mode.

the line ComponentCore.createComponent(project);
returns a null.

    public static void createModuleEntry(IProject project, String moduleName) throws
CoreException {

        IVirtualComponent component = ComponentCore.createComponent(project);
        IVirtualFolder folder = component.getRootFolder().getFolder("/");
        IContainer[] underlyingFolders = folder.getUnderlyingFolders();
        IResource[] underlyingResources = folder.getUnderlyingResources();
        IVirtualResource[] members = folder.members();
//      IVirtualResource[] members = folder.members();
//      IVirtualFolder folder2 = folder.getFolder(new
Path(getGwtOutputFolder()).append(moduleName));
//      IContainer[] underlyingFolders = folder.getUnderlyingFolders();
        IVirtualFolder moduleOutputFolder = component.getRootFolder().getFolder("/"); 
//$NON-NLS-1$
        moduleOutputFolder.createLink(new Path(getGwtOutputFolder()).append(moduleName),
IResource.FORCE, null); 

    }

Original comment by t.bussie...@gmail.com on 3 Dec 2007 at 10:07

GoogleCodeExporter commented 9 years ago
Hi
 Are you sure than your project has wtp nature ?
Olivier

Original comment by olivier....@gmail.com on 11 Apr 2008 at 9:55

GoogleCodeExporter commented 9 years ago
You should create a module only in Dynamic web projects. If you try to create 
it on a
normal java project, this exception will be thrown

Original comment by grprakash on 26 Apr 2008 at 8:29