- move Codeless Project wizard from layer.xml to Annotations

experimental
Normen Hansen 10 years ago
parent aeeaf46d84
commit 3512e37f08
  1. 11
      sdk/jme3-core/src/com/jme3/gde/core/codeless/CodelessProjectWizardAction.java
  2. 13
      sdk/jme3-core/src/com/jme3/gde/core/layer.xml

@ -47,6 +47,9 @@ import org.netbeans.api.project.ProjectManager;
import org.netbeans.api.project.ui.OpenProjects; import org.netbeans.api.project.ui.OpenProjects;
import org.openide.DialogDisplayer; import org.openide.DialogDisplayer;
import org.openide.WizardDescriptor; import org.openide.WizardDescriptor;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionRegistration;
import org.openide.filesystems.FileLock; import org.openide.filesystems.FileLock;
import org.openide.filesystems.FileObject; import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil; import org.openide.filesystems.FileUtil;
@ -54,9 +57,13 @@ import org.openide.util.Exceptions;
import org.openide.util.HelpCtx; import org.openide.util.HelpCtx;
import org.openide.util.actions.CallableSystemAction; import org.openide.util.actions.CallableSystemAction;
// An example action demonstrating how the wizard could be called from within
// your code. You can copy-paste the code below wherever you need.
@SuppressWarnings({"unchecked", "rawtypes"}) @SuppressWarnings({"unchecked", "rawtypes"})
@ActionID(id = "com.jme3.gde.core.codeless.CodelessProjectWizardAction", category = "CodelessProjects")
@ActionRegistration(iconBase = "com/jme3/gde/core/assets/actions/jme-logo.png",
displayName = "#CTL_Codeless_Project",
lazy = false,
iconInMenu = true)
@ActionReference(path = "Menu/File/Import", name = "CodelessProject", position = 0)
public final class CodelessProjectWizardAction extends CallableSystemAction { public final class CodelessProjectWizardAction extends CallableSystemAction {
private static final Logger logger = Logger.getLogger(CodelessProjectWizardAction.class.getName()); private static final Logger logger = Logger.getLogger(CodelessProjectWizardAction.class.getName());

@ -2,15 +2,6 @@
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd"> <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
<filesystem> <filesystem>
<folder name="Actions"> <folder name="Actions">
<folder name="CodelessProjects">
<file name="com-jme3-gde-core-codeless-CodelessProjectWizardAction.instance">
<attr name="delegate" methodvalue="org.openide.awt.Actions.inject"/>
<attr name="displayName" bundlevalue="com.jme3.gde.core.codeless.Bundle#CTL_Codeless_Project"/>
<attr name="iconBase" stringvalue="com/jme3/gde/core/assets/actions/jme-logo.png"/>
<attr name="injectable" stringvalue="com.jme3.gde.core.codeless.CodelessProjectWizardAction"/>
<attr name="noIconInMenu" boolvalue="false"/>
</file>
</folder>
<folder name="jMonkeyPlatform"> <folder name="jMonkeyPlatform">
<file name="com-jme3-gde-core-assets-actions-OpenModel.instance"> <file name="com-jme3-gde-core-assets-actions-OpenModel.instance">
<attr name="delegate" methodvalue="org.openide.awt.Actions.inject"/> <attr name="delegate" methodvalue="org.openide.awt.Actions.inject"/>
@ -65,10 +56,6 @@
</folder> </folder>
<folder name="File"> <folder name="File">
<folder name="Import"> <folder name="Import">
<file name="CodelessProject.shadow">
<attr name="originalFile" stringvalue="Actions/CodelessProjects/com-jme3-gde-core-codeless-CodelessProjectWizardAction.instance"/>
<attr name="position" intvalue="0"/>
</file>
<file name="org-netbeans-modules-projectimport-eclipse-core-ImportProjectAction.shadow_hidden"/> <file name="org-netbeans-modules-projectimport-eclipse-core-ImportProjectAction.shadow_hidden"/>
<file name="org-netbeans-modules-projectimport-eclipse-core-ResynchronizeEclipseAction.shadow_hidden"/> <file name="org-netbeans-modules-projectimport-eclipse-core-ResynchronizeEclipseAction.shadow_hidden"/>
</folder> </folder>

Loading…
Cancel
Save