- Move OgreXML Tools layer registration to Annotations

experimental
Normen Hansen 10 years ago
parent 90a195a3ee
commit 40e42e0003
  1. 4
      sdk/jme3-ogretools/nbproject/genfiles.properties
  2. 36
      sdk/jme3-ogretools/src/com/jme3/gde/ogretools/OgreBinaryMeshDataObject.java
  3. 12
      sdk/jme3-ogretools/src/com/jme3/gde/ogretools/OgreBinaryMeshResolver.xml
  4. 6
      sdk/jme3-ogretools/src/com/jme3/gde/ogretools/blender/InstallBlenderExporter.java
  5. 112
      sdk/jme3-ogretools/src/com/jme3/gde/ogretools/layer.xml
  6. 10
      sdk/jme3-ogretools/src/com/jme3/gde/ogretools/package-info.java

@ -3,6 +3,6 @@ build.xml.script.CRC32=6423eb2c
build.xml.stylesheet.CRC32=79c3b980@1.31.2.7
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=e1bf6d31
nbproject/build-impl.xml.data.CRC32=3ade7155
nbproject/build-impl.xml.script.CRC32=4a050ba2
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.66.1
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1

@ -14,16 +14,46 @@ import com.jme3.scene.Spatial;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressHandleFactory;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor;
import org.openide.filesystems.FileLock;
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;
import org.openide.util.Exceptions;
@MIMEResolver.ExtensionRegistration(
displayName="Ogre Binary Mesh",
mimeType="application/ogrebinarymesh",
extension={ "mesh" }
)
@DataObject.Registration(displayName = "Ogre Binary Mesh", mimeType = "application/ogrebinarymesh", iconBase = "com/jme3/gde/ogretools/ogre-logo.png")
@ActionReferences(value = {
@ActionReference(id =
@ActionID(category = "jMonkeyPlatform", id = "com.jme3.gde.core.assets.actions.ConvertModel"), path = "Loaders/application/ogrebinarymesh/Actions", position = 10),
@ActionReference(id =
@ActionID(category = "jMonkeyPlatform", id = "com.jme3.gde.core.assets.actions.OpenModel"), path = "Loaders/application/ogrebinarymesh/Actions", position = 20),
@ActionReference(id =
@ActionID(category = "Edit", id = "org.openide.actions.CutAction"), path = "Loaders/application/ogrebinarymesh/Actions", position = 200, separatorBefore = 100),
@ActionReference(id =
@ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), path = "Loaders/application/ogrebinarymesh/Actions", position = 300, separatorAfter = 400),
@ActionReference(id =
@ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), path = "Loaders/application/ogrebinarymesh/Actions", position = 500),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.RenameAction"), path = "Loaders/application/ogrebinarymesh/Actions", position = 600, separatorAfter = 700),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), path = "Loaders/application/ogrebinarymesh/Actions", position = 800, separatorAfter = 900),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), path = "Loaders/application/ogrebinarymesh/Actions", position = 1000, separatorAfter = 1100),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = "Loaders/application/ogrebinarymesh/Actions", position = 1200),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = "Loaders/application/ogrebinarymesh/Actions", position = 1300)
})
public class OgreBinaryMeshDataObject extends SpatialAssetDataObject {
public OgreBinaryMeshDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {

@ -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="mesh"/>
<resolver mime="application/ogrebinarymesh"/>
</file>
</MIME-resolver>

@ -6,7 +6,13 @@ package com.jme3.gde.ogretools.blender;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionRegistration;
@ActionID(id = "com.jme3.gde.ogretools.blender.InstallBlenderExporter", category = "JME3")
@ActionRegistration(iconBase = "com/jme3/gde/ogretools/blender/ogre-logo.png", displayName = "#CTL_InstallBlenderExporter", iconInMenu = true)
@ActionReference(path = "Menu/Tools/OgreXML", position = 1250)
public final class InstallBlenderExporter implements ActionListener {
public void actionPerformed(ActionEvent e) {

@ -2,15 +2,6 @@
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
<filesystem>
<folder name="Actions">
<folder name="JME3">
<file name="com-jme3-gde-ogretools-blender-InstallBlenderExporter.instance">
<attr name="delegate" newvalue="com.jme3.gde.ogretools.blender.InstallBlenderExporter"/>
<attr name="displayName" bundlevalue="com.jme3.gde.ogretools.blender.Bundle#CTL_InstallBlenderExporter"/>
<attr name="iconBase" stringvalue="com/jme3/gde/ogretools/blender/ogre-logo.png"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
<attr name="noIconInMenu" boolvalue="false"/>
</file>
</folder>
<folder name="OgreXML">
<file name="com-jme3-gde-ogretools-convert-AdvOgreXMLConvertAction.instance">
<attr name="delegate" methodvalue="org.openide.awt.Actions.inject"/>
@ -23,107 +14,4 @@
</file>
</folder>
</folder>
<folder name="Loaders">
<folder name="application">
<folder name="ogrebinarymesh">
<folder name="Actions">
<file name="com-jme3-gde-core-assets-actions-ConvertModel.shadow">
<attr name="originalFile" stringvalue="Actions/jMonkeyPlatform/com-jme3-gde-core-assets-actions-ConvertModel.instance"/>
<attr name="position" intvalue="10"/>
</file>
<file name="com-jme3-gde-ogretools-convert-AdvOgreXMLConvertAction.shadow">
<attr name="originalFile" stringvalue="Actions/OgreXML/com-jme3-gde-ogretools-convert-AdvOgreXMLConvertAction.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="OgreBinaryMeshDataLoader.instance">
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/com/jme3/gde/ogretools/ogre-logo.png"/>
<attr name="dataObjectClass" stringvalue="com.jme3.gde.ogretools.OgreBinaryMeshDataObject"/>
<attr name="instanceCreate" methodvalue="org.openide.loaders.DataLoaderPool.factory"/>
<attr name="mimeType" stringvalue="application/ogrebinarymesh"/>
</file>
</folder>
</folder>
</folder>
<folder name="text">
<folder name="ogrexml+xml">
<folder name="Actions">
<file name="com-jme3-gde-ogretools-convert-AdvOgreXMLConvert.shadow">
<attr name="originalFile" stringvalue="Actions/OgreXML/com-jme3-gde-ogretools-convert-AdvOgreXMLConvertAction.instance"/>
<attr name="position" intvalue="100"/>
</file>
</folder>
</folder>
</folder>
</folder>
<folder name="Menu">
<folder name="Tools">
<folder name="OgreXML">
<file name="com-jme3-gde-ogretools-blender-InstallBlenderExporter.shadow">
<attr name="originalFile" stringvalue="Actions/JME3/com-jme3-gde-ogretools-blender-InstallBlenderExporter.instance"/>
<attr name="position" intvalue="1250"/>
</file>
</folder>
</folder>
</folder>
<folder name="Services">
<folder name="MIMEResolver">
<file name="OgreBinaryMeshResolver.xml" url="OgreBinaryMeshResolver.xml">
<attr name="displayName" bundlevalue="com.jme3.gde.ogretools.Bundle#Services/MIMEResolver/OgreBinaryMeshResolver.xml"/>
</file>
</folder>
</folder>
</filesystem>

@ -0,0 +1,10 @@
@ActionReferences(value = {
@ActionReference(id =
@ActionID(category = "OgreXML", id = "com.jme3.gde.ogretools.convert.AdvOgreXMLConvertAction"), path = "Loaders/text/ogrexml+xml/Actions", position = 30)
})
package com.jme3.gde.ogretools;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
Loading…
Cancel
Save