- Move Wavefront OBJ Support layer registration to Annotations

experimental
Normen Hansen 10 years ago
parent 40e42e0003
commit c8d66f224c
  1. 1
      sdk/jme3-wavefront/manifest.mf
  2. 8
      sdk/jme3-wavefront/nbproject/genfiles.properties
  3. 11
      sdk/jme3-wavefront/src/com/jme3/gde/wavefront/WaveFrontMaterialDataObject.java
  4. 13
      sdk/jme3-wavefront/src/com/jme3/gde/wavefront/WaveFrontMaterialResolver.xml
  5. 36
      sdk/jme3-wavefront/src/com/jme3/gde/wavefront/WaveFrontOBJDataObject.java
  6. 13
      sdk/jme3-wavefront/src/com/jme3/gde/wavefront/WaveFrontOBJResolver.xml
  7. 171
      sdk/jme3-wavefront/src/com/jme3/gde/wavefront/layer.xml

@ -1,6 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: com.jme3.gde.wavefront/1
OpenIDE-Module-Implementation-Version: 0
OpenIDE-Module-Layer: com/jme3/gde/wavefront/layer.xml
OpenIDE-Module-Localizing-Bundle: com/jme3/gde/wavefront/Bundle.properties

@ -1,8 +1,8 @@
build.xml.data.CRC32=0406ce7c
build.xml.data.CRC32=f45ac22f
build.xml.script.CRC32=fa305471
build.xml.stylesheet.CRC32=a56c6a5b@2.66.1
build.xml.stylesheet.CRC32=a56c6a5b@2.67.1
# 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=0406ce7c
nbproject/build-impl.xml.data.CRC32=f45ac22f
nbproject/build-impl.xml.script.CRC32=8239585b
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.66.1
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1

@ -7,12 +7,17 @@ package com.jme3.gde.wavefront;
import com.jme3.gde.core.assets.AssetDataObject;
import java.io.IOException;
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.nodes.CookieSet;
import org.openide.nodes.Node;
import org.openide.text.DataEditorSupport;
@MIMEResolver.ExtensionRegistration(
displayName = "Wavefront OBJ Material",
mimeType = "text/x-wavefrontmtl",
extension = {"mtl", "MTL"}
)
@DataObject.Registration(displayName = "Wavefront OBJ Material", mimeType = "text/x-wavefrontmtl", iconBase="com/jme3/gde/wavefront/Computer_File_083.gif")
public class WaveFrontMaterialDataObject extends AssetDataObject {
public WaveFrontMaterialDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {

@ -1,13 +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="mtl"/>
<ext name="MTL"/>
<resolver mime="text/x-wavefrontmtl"/>
</file>
</MIME-resolver>

@ -6,13 +6,43 @@ package com.jme3.gde.wavefront;
import com.jme3.gde.core.assets.SpatialAssetDataObject;
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;
import org.openide.nodes.CookieSet;
import org.openide.nodes.Node;
import org.openide.text.DataEditorSupport;
@MIMEResolver.ExtensionRegistration(
displayName = "Wavefront OBJ",
mimeType = "text/x-wavefrontobj",
extension = {"obj", "OBJ"}
)
@DataObject.Registration(displayName = "Wavefront OBJ", mimeType = "text/x-wavefrontobj", iconBase ="com/jme3/gde/wavefront/People_039.gif")
@ActionReferences(value = {
@ActionReference(id =
@ActionID(category = "jMonkeyPlatform", id = "com.jme3.gde.core.assets.actions.ConvertModel"), path = "Loaders/text/x-wavefrontobj/Actions", position = 10),
@ActionReference(id =
@ActionID(category = "jMonkeyPlatform", id = "com.jme3.gde.core.assets.actions.OpenModel"), path = "Loaders/text/x-wavefrontobj/Actions", position = 20),
@ActionReference(id =
@ActionID(category = "Edit", id = "org.openide.actions.CutAction"), path = "Loaders/text/x-wavefrontobj/Actions", position = 200, separatorBefore = 100),
@ActionReference(id =
@ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), path = "Loaders/text/x-wavefrontobj/Actions", position = 300, separatorAfter = 400),
@ActionReference(id =
@ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), path = "Loaders/text/x-wavefrontobj/Actions", position = 500),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.RenameAction"), path = "Loaders/text/x-wavefrontobj/Actions", position = 600, separatorAfter = 700),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), path = "Loaders/text/x-wavefrontobj/Actions", position = 800, separatorAfter = 900),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), path = "Loaders/text/x-wavefrontobj/Actions", position = 1000, separatorAfter = 1100),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = "Loaders/text/x-wavefrontobj/Actions", position = 1200),
@ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = "Loaders/text/x-wavefrontobj/Actions", position = 1300)
})
public class WaveFrontOBJDataObject extends SpatialAssetDataObject {
public WaveFrontOBJDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {

@ -1,13 +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="obj"/>
<ext name="OBJ"/>
<resolver mime="text/x-wavefrontobj"/>
</file>
</MIME-resolver>

@ -1,171 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
<filesystem>
<folder name="Actions">
<folder name="Wavefront">
<file name="com-jme3-gde-wavefront-importer-WavefrontOBJToJme.instance">
<attr name="delegate" methodvalue="org.openide.awt.Actions.inject"/>
<attr name="displayName" bundlevalue="com.jme3.gde.wavefront.importer.Bundle#CTL_WavefrontOBJToJme"/>
<attr name="injectable" stringvalue="com.jme3.gde.wavefront.importer.WavefrontOBJToJme"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.context"/>
<attr name="noIconInMenu" boolvalue="false"/>
<attr name="selectionType" stringvalue="EXACTLY_ONE"/>
<attr name="type" stringvalue="org.openide.loaders.DataObject"/>
</file>
</folder>
</folder>
<folder name="Loaders">
<folder name="text">
<folder name="x-wavefrontobj">
<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-core-assets-actions-OpenModel.shadow">
<attr name="originalFile" stringvalue="Actions/jMonkeyPlatform/com-jme3-gde-core-assets-actions-OpenModel.instance"/>
<attr name="position" intvalue="10"/>
</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="WaveFrontOBJDataLoader.instance">
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/com/jme3/gde/wavefront/People_039.gif"/>
<attr name="dataObjectClass" stringvalue="com.jme3.gde.wavefront.WaveFrontOBJDataObject"/>
<attr name="instanceCreate" methodvalue="org.openide.loaders.DataLoaderPool.factory"/>
<attr name="mimeType" stringvalue="text/x-wavefrontobj"/>
</file>
</folder>
</folder>
<folder name="x-wavefrontmtl">
<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="400"/>
</file>
<file name="org-openide-actions-CutAction.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CutAction.instance"/>
<attr name="position" intvalue="300"/>
</file>
<file name="org-openide-actions-DeleteAction.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-DeleteAction.instance"/>
<attr name="position" intvalue="600"/>
</file>
<file name="org-openide-actions-FileSystemAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-FileSystemAction.instance"/>
<attr name="position" intvalue="1100"/>
</file>
<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-PropertiesAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-PropertiesAction.instance"/>
<attr name="position" intvalue="1400"/>
</file>
<file name="org-openide-actions-RenameAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-RenameAction.instance"/>
<attr name="position" intvalue="700"/>
</file>
<file name="org-openide-actions-SaveAsTemplateAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAsTemplateAction.instance"/>
<attr name="position" intvalue="900"/>
</file>
<file name="org-openide-actions-ToolsAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-ToolsAction.instance"/>
<attr name="position" intvalue="1300"/>
</file>
<file name="sep-1.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="200"/>
</file>
<file name="sep-2.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="500"/>
</file>
<file name="sep-3.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="800"/>
</file>
<file name="sep-4.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="1000"/>
</file>
<file name="sep-5.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="1200"/>
</file>
</folder>
<folder name="Factories">
<file name="WaveFrontMaterialDataLoader.instance">
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/com/jme3/gde/wavefront/Computer_File_083.gif"/>
<attr name="dataObjectClass" stringvalue="com.jme3.gde.wavefront.WaveFrontMaterialDataObject"/>
<attr name="instanceCreate" methodvalue="org.openide.loaders.DataLoaderPool.factory"/>
<attr name="mimeType" stringvalue="text/x-wavefrontmtl"/>
</file>
</folder>
</folder>
</folder>
</folder>
<folder name="Services">
<folder name="MIMEResolver">
<file name="WaveFrontMaterialResolver.xml" url="WaveFrontMaterialResolver.xml">
<attr name="displayName" bundlevalue="com.jme3.gde.wavefront.Bundle#Services/MIMEResolver/WaveFrontMaterialResolver.xml"/>
</file>
<file name="WaveFrontOBJResolver.xml" url="WaveFrontOBJResolver.xml">
<attr name="displayName" bundlevalue="com.jme3.gde.wavefront.Bundle#Services/MIMEResolver/WaveFrontOBJResolver.xml"/>
</file>
</folder>
</folder>
</filesystem>
Loading…
Cancel
Save