- Move Core j3o Model and j3f Filter layer registration to Annotations

experimental
Normen Hansen 10 years ago
parent c8d66f224c
commit 5ff3c0ef7d
  1. 5
      sdk/jme3-core/src/com/jme3/gde/core/Bundle.properties
  2. 12
      sdk/jme3-core/src/com/jme3/gde/core/FilterPostProcessorResolver.xml
  3. 14
      sdk/jme3-core/src/com/jme3/gde/core/JMEBinaryModelResolver.xml
  4. 21
      sdk/jme3-core/src/com/jme3/gde/core/assets/BinaryModelFileLoader.java
  5. 1
      sdk/jme3-core/src/com/jme3/gde/core/assets/Bundle.properties
  6. 21
      sdk/jme3-core/src/com/jme3/gde/core/assets/FilterDataObject.java
  7. 149
      sdk/jme3-core/src/com/jme3/gde/core/layer.xml
  8. 7
      sdk/jme3-core/src/com/jme3/gde/core/package-info.java

@ -3,8 +3,5 @@ OpenIDE-Module-Long-Description=\
This plugin provides the core functions of jMonkeyEngine GDE.
OpenIDE-Module-Name=SDK Core
OpenIDE-Module-Short-Description=The jMonkeyEngine GDE Core Plugin
Services/MIMEResolver/FilterPostProcessorResolver.xml=FilterPostProcessor Files
Services/MIMEResolver/JMEBinaryModelResolver.xml=JMEBinaryModel Files
Menu/Help/jmewiki.url=Browse Help online
Menu/Help/help-main.xml=Browse Help locally
Templates/Other/filter.j3f=Empty FilterPostProcessor file
Menu/Help/help-main.xml=Browse Help locally

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
<MIME-resolver>
<file>
<ext name="j3f"/>
<resolver mime="application/jme3filterpostprocessor"/>
</file>
</MIME-resolver>

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
<MIME-resolver>
<file>
<ext name="j3odata"/>
<ext name="j3o"/>
<ext name="j3s"/>
<resolver mime="application/jme3model"/>
</file>
</MIME-resolver>

@ -32,8 +32,13 @@
package com.jme3.gde.core.assets;
import java.io.IOException;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;
import org.openide.filesystems.MIMEResolver;
import org.openide.loaders.DataObject;
import org.openide.loaders.DataObjectExistsException;
import org.openide.loaders.ExtensionList;
import org.openide.loaders.FileEntry;
@ -44,6 +49,22 @@ import org.openide.loaders.MultiFileLoader;
*
* @author normenhansen
*/
@MIMEResolver.ExtensionRegistration(
displayName = "jME3 Model",
mimeType = "application/jme3model",
extension = {"j3o", "j3s", "j3odata"}
)
@DataObject.Registration(iconBase = "com/jme3/gde/core/icons/jme-logo.png", displayName = "jME3 Model", mimeType = "application/jme3model")
@ActionReferences({
@ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), path = "Loaders/application/jme3model/Actions", position = 200, separatorBefore = 100),
@ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), path = "Loaders/application/jme3model/Actions", position = 300, separatorAfter = 400),
@ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), path = "Loaders/application/jme3model/Actions", position = 500),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.RenameAction"), path = "Loaders/application/jme3model/Actions", position = 600, separatorAfter = 700),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), path = "Loaders/application/jme3model/Actions", position = 800, separatorAfter = 900),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), path = "Loaders/application/jme3model/Actions", position = 1000, separatorAfter = 1100),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = "Loaders/application/jme3model/Actions", position = 1200),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = "Loaders/application/jme3model/Actions", position = 1300),
})
public class BinaryModelFileLoader extends MultiFileLoader {
public static final String PROP_EXTENSIONS = "extensions"; // NOI18N

@ -1,2 +1 @@
LBL_JMEBinaryModel_loader_name=JMEBinaryModel Files
TextureBrowser.title=Texture Browser

@ -34,7 +34,12 @@ package com.jme3.gde.core.assets;
import com.jme3.gde.core.filters.FilterPostProcessorNode;
import com.jme3.post.FilterPostProcessor;
import java.io.IOException;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.MIMEResolver;
import org.openide.loaders.DataObject;
import org.openide.loaders.DataObjectExistsException;
import org.openide.loaders.MultiFileLoader;
@ -42,6 +47,22 @@ import org.openide.loaders.MultiFileLoader;
*
* @author normenhansen
*/
@MIMEResolver.ExtensionRegistration(
displayName = "FilterPostProcessor Files",
mimeType = "application/jme3filterpostprocessor",
extension = {"j3f"}
)
@DataObject.Registration(iconBase = "com/jme3/gde/core/icons/eye.gif", displayName = "jME3 FilterPostProcessor", mimeType = "application/jme3filterpostprocessor")
@ActionReferences({
@ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), path = "Loaders/application/jme3filterpostprocessor/Actions", position = 200, separatorBefore = 100),
@ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), path = "Loaders/application/jme3filterpostprocessor/Actions", position = 300, separatorAfter = 400),
@ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), path = "Loaders/application/jme3filterpostprocessor/Actions", position = 500),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.RenameAction"), path = "Loaders/application/jme3filterpostprocessor/Actions", position = 600, separatorAfter = 700),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), path = "Loaders/application/jme3filterpostprocessor/Actions", position = 800, separatorAfter = 900),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), path = "Loaders/application/jme3filterpostprocessor/Actions", position = 1000, separatorAfter = 1100),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = "Loaders/application/jme3filterpostprocessor/Actions", position = 1200),
@ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = "Loaders/application/jme3filterpostprocessor/Actions", position = 1300)
})
public class FilterDataObject extends AssetDataObject {
public FilterDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {

@ -143,141 +143,6 @@
</folder>
</folder>
</folder>
<folder name="Loaders">
<folder name="application">
<folder name="jme3filterpostprocessor">
<folder name="Actions">
<file name="org-openide-actions-CopyAction.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CopyAction.instance"/>
<attr name="position" intvalue="300"/>
</file>
<file name="org-openide-actions-CutAction.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CutAction.instance"/>
<attr name="position" intvalue="200"/>
</file>
<file name="org-openide-actions-DeleteAction.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-DeleteAction.instance"/>
<attr name="position" intvalue="500"/>
</file>
<file name="org-openide-actions-FileSystemAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-FileSystemAction.instance"/>
<attr name="position" intvalue="1000"/>
</file>
<file name="org-openide-actions-PropertiesAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-PropertiesAction.instance"/>
<attr name="position" intvalue="1300"/>
</file>
<file name="org-openide-actions-RenameAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-RenameAction.instance"/>
<attr name="position" intvalue="600"/>
</file>
<file name="org-openide-actions-SaveAsTemplateAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAsTemplateAction.instance"/>
<attr name="position" intvalue="800"/>
</file>
<file name="org-openide-actions-ToolsAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-ToolsAction.instance"/>
<attr name="position" intvalue="1200"/>
</file>
<file name="sep-1.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="100"/>
</file>
<file name="sep-2.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="400"/>
</file>
<file name="sep-3.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="700"/>
</file>
<file name="sep-4.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="900"/>
</file>
<file name="sep-5.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="1100"/>
</file>
</folder>
<folder name="Factories">
<file name="FilterPostProcessorDataLoader.instance">
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:com/jme3/gde/core/filters/icons/eye.gif"/>
<attr name="dataObjectClass" stringvalue="com.jme3.gde.core.assets.FilterDataObject"/>
<attr name="instanceCreate" methodvalue="org.openide.loaders.DataLoaderPool.factory"/>
<attr name="mimeType" stringvalue="application/jme3filterpostprocessor"/>
</file>
</folder>
</folder>
<folder name="jme3model">
<folder name="Actions">
<!--file name="org-openide-actions-OpenAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-OpenAction.instance"/>
<attr name="position" intvalue="100"/>
</file-->
<file name="org-openide-actions-CopyAction.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CopyAction.instance"/>
<attr name="position" intvalue="300"/>
</file>
<file name="org-openide-actions-CutAction.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CutAction.instance"/>
<attr name="position" intvalue="200"/>
</file>
<file name="org-openide-actions-DeleteAction.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-DeleteAction.instance"/>
<attr name="position" intvalue="500"/>
</file>
<file name="org-openide-actions-FileSystemAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-FileSystemAction.instance"/>
<attr name="position" intvalue="1000"/>
</file>
<file name="org-openide-actions-PropertiesAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-PropertiesAction.instance"/>
<attr name="position" intvalue="1300"/>
</file>
<file name="org-openide-actions-RenameAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-RenameAction.instance"/>
<attr name="position" intvalue="600"/>
</file>
<file name="org-openide-actions-SaveAsTemplateAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAsTemplateAction.instance"/>
<attr name="position" intvalue="800"/>
</file>
<file name="org-openide-actions-ToolsAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-ToolsAction.instance"/>
<attr name="position" intvalue="1200"/>
</file>
<file name="sep-1.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="100"/>
</file>
<file name="sep-2.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="400"/>
</file>
<file name="sep-3.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="700"/>
</file>
<file name="sep-4.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="900"/>
</file>
<file name="sep-5.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="1100"/>
</file>
</folder>
<folder name="Factories">
<file name="com-jme3-gde-core-assets-BinaryModelFileLoader.instance">
<attr name="dataObjectClass" stringvalue="com.jme3.gde.core.assets.BinaryModelDataObject"/>
<attr name="iconBase" stringvalue="com/jme3/gde/core/assets/jme-logo.png"/>
<attr name="mimeType" stringvalue="application/jme3model"/>
</file>
</folder>
</folder>
</folder>
</folder>
<folder name="Toolbars">
<folder name="jMonkeyPlatform-Tools">
<attr name="position" intvalue="175"/>
@ -301,12 +166,6 @@
</folder>
</folder>
<folder name="Templates">
<folder name="Filters">
<file name="filter.j3f" url="filter.j3f">
<attr name="displayName" bundlevalue="com.jme3.gde.core.Bundle#Templates/Other/filter.j3f"/>
<attr name="template" boolvalue="true"/>
</file>
</folder>
<folder name="Project">
<folder name="Samples">
<file name="Standard_hidden"/>
@ -321,14 +180,6 @@
<folder name="JavaHelp">
<file name="org-netbeans-modules-java-helpset.xml_hidden"/>
</folder>
<folder name="MIMEResolver">
<file name="FilterPostProcessorResolver.xml" url="FilterPostProcessorResolver.xml">
<attr name="displayName" bundlevalue="com.jme3.gde.core.Bundle#Services/MIMEResolver/FilterPostProcessorResolver.xml"/>
</file>
<file name="JMEBinaryModelResolver.xml" url="JMEBinaryModelResolver.xml">
<attr name="displayName" bundlevalue="com.jme3.gde.core.Bundle#Services/MIMEResolver/JMEBinaryModelResolver.xml"/>
</file>
</folder>
</folder>
<folder name="Windows2">
<folder name="Components">

@ -0,0 +1,7 @@
@TemplateRegistrations({
@TemplateRegistration(folder = "Filters", content = "filter.j3f", displayName = "jME3 Post Filter"),
})
package com.jme3.gde.core;
import org.netbeans.api.templates.TemplateRegistration;
import org.netbeans.api.templates.TemplateRegistrations;
Loading…
Cancel
Save