- Move Texture Editor layer registration to Annotations

experimental
Normen Hansen 10 years ago
parent 0bbc176e40
commit 947d587f7b
  1. 2
      sdk/jme3-texture-editor/src/com/jme3/gde/textureeditor/Bundle.properties
  2. 31
      sdk/jme3-texture-editor/src/com/jme3/gde/textureeditor/JmeTextureDataObject.java
  3. 87
      sdk/jme3-texture-editor/src/com/jme3/gde/textureeditor/layer.xml
  4. 9
      sdk/jme3-texture-editor/src/com/jme3/gde/textureeditor/package-info.java

@ -9,5 +9,3 @@ OpenIDE-Module-Long-Description=\
This plugin combines commonly needed image operations for textures.
OpenIDE-Module-Name=Texture Editor
OpenIDE-Module-Short-Description=Combines commonly needed image operations for textures
Services/MIMEResolver/JmeTextureResolver.xml=JmeTexture Files
Templates/Other/JmeTextureTemplate.jpg=Empty JmeTexture file

@ -5,8 +5,13 @@
package com.jme3.gde.textureeditor;
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.DataNode;
import org.openide.loaders.DataObject;
import org.openide.loaders.DataObjectExistsException;
import org.openide.loaders.MultiDataObject;
import org.openide.loaders.MultiFileLoader;
@ -14,6 +19,32 @@ import org.openide.nodes.Node;
import org.openide.nodes.Children;
import org.openide.util.Lookup;
@MIMEResolver.ExtensionRegistration(
displayName = "jME3 Texture",
mimeType = "image/x-jmetexture",
extension = {"png", "bmp", "jpg", "PNG", "BMP", "JPG", "jpeg", "JPEG", "tga", "TGA"}
)
@DataObject.Registration(displayName = "jME3 Texture", mimeType = "image/x-jmetexture", iconBase = "com/jme3/gde/textureeditor/Computer_File_068.gif")
@ActionReferences(value = {
@ActionReference(id =
@ActionID(category = "JME3", id = "com.jme3.gde.textureeditor.OpenTexture"), path = "Loaders/image/x-jmetexture/Actions", position = 0),
@ActionReference(id =
@ActionID(category = "Edit", id = "org.openide.actions.CutAction"), path = "Loaders/image/x-jmetexture/Actions", position = 200, separatorBefore = 100),
@ActionReference(id =
@ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), path = "Loaders/image/x-jmetexture/Actions", position = 300, separatorAfter = 400),
@ActionReference(id =
@ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), path = "Loaders/image/x-jmetexture/Actions", position = 500),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.RenameAction"), path = "Loaders/image/x-jmetexture/Actions", position = 600, separatorAfter = 700),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), path = "Loaders/image/x-jmetexture/Actions", position = 800, separatorAfter = 900),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), path = "Loaders/image/x-jmetexture/Actions", position = 1000, separatorAfter = 1100),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = "Loaders/image/x-jmetexture/Actions", position = 1200),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = "Loaders/image/x-jmetexture/Actions", position = 1300)
})
public class JmeTextureDataObject extends MultiDataObject {
public JmeTextureDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {

@ -22,93 +22,6 @@
</file>
</folder>
</folder>
<folder name="Loaders">
<folder name="image">
<folder name="png-gif-jpeg-bmp">
<folder name="Actions">
<file name="com-jme3-gde-textureeditor-OpenTexture.shadow">
<attr name="originalFile" stringvalue="Actions/JME3/com-jme3-gde-textureeditor-OpenTexture.instance"/>
<attr name="position" intvalue="0"/>
</file>
</folder>
</folder>
<folder name="x-jmetexture">
<folder name="Actions">
<file name="com-jme3-gde-textureeditor-OpenTexture.shadow">
<attr name="originalFile" stringvalue="Actions/JME3/com-jme3-gde-textureeditor-OpenTexture.instance"/>
<attr name="position" intvalue="0"/>
</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="JmeTextureDataLoader.instance">
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/com/jme3/gde/textureeditor/Computer_File_068.gif"/>
<attr name="dataObjectClass" stringvalue="com.jme3.gde.textureeditor.JmeTextureDataObject"/>
<attr name="instanceCreate" methodvalue="org.openide.loaders.DataLoaderPool.factory"/>
<attr name="mimeType" stringvalue="image/x-jmetexture"/>
</file>
</folder>
</folder>
</folder>
</folder>
<folder name="Services">
<folder name="MIMEResolver">
<file name="JmeTextureResolver.xml" url="JmeTextureResolver.xml">
<attr name="displayName" bundlevalue="com.jme3.gde.textureeditor.Bundle#Services/MIMEResolver/JmeTextureResolver.xml"/>
</file>
</folder>
</folder>
<folder name="Windows2">
<folder name="Components">
<file name="ImageEditorTopComponent.settings" url="ImageEditorTopComponentSettings.xml"/>

@ -0,0 +1,9 @@
@ActionReferences(value = {
@ActionReference(id =
@ActionID(category = "JME3", id = "com.jme3.gde.textureeditor.OpenTexture"), path = "Loaders/image/png-gif-jpeg-bmp/Actions", position = 0),
})
package com.jme3.gde.textureeditor;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
Loading…
Cancel
Save