- Move Material Support layer registration to Annotations

experimental
Normen Hansen 10 years ago
parent 5ff3c0ef7d
commit 7cab7576aa
  1. 8
      sdk/jme3-materialeditor/nbproject/genfiles.properties
  2. 1
      sdk/jme3-materialeditor/src/com/jme3/gde/materials/Bundle.properties
  3. 9
      sdk/jme3-materialeditor/src/com/jme3/gde/materials/JMEMaterialDataObject.java
  4. 15
      sdk/jme3-materialeditor/src/com/jme3/gde/materials/JMEMaterialResolver.xml
  5. 103
      sdk/jme3-materialeditor/src/com/jme3/gde/materials/layer.xml
  6. 7
      sdk/jme3-materialeditor/src/com/jme3/gde/materials/package-info.java

@ -1,8 +1,8 @@
build.xml.data.CRC32=5702bc60
build.xml.data.CRC32=7e92080c
build.xml.script.CRC32=f284e28d
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=5702bc60
nbproject/build-impl.xml.data.CRC32=7e92080c
nbproject/build-impl.xml.script.CRC32=56cee44d
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.66.1
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1

@ -6,7 +6,6 @@ OpenIDE-Module-Short-Description=Provides support for editing jME3 material file
Services/MIMEResolver/JMEMaterialDefinitionResolver.xml=MaterialDefinition Files
Services/MIMEResolver/JMEMaterialResolver.xml=Material Files
Templates/Other/JMEMaterialDefinitionTemplate.j3md=Empty MaterialDefinition file
Templates/Other/JMEMaterialTemplate.j3m=Empty Material file
MaterialBrowser.okButton.text=Ok
MaterialBrowser.cancelButton.text=Cancel
MaterialBrowser.title=Material Browser

@ -35,12 +35,19 @@ import com.jme3.gde.core.assets.AssetDataObject;
import com.jme3.gde.materials.multiview.MaterialOpenSupport;
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 = "jME3 Material",
mimeType = "text/jme3material",
extension = {"j3m", "J3M"}
)
@DataObject.Registration(displayName = "jME3 Material", mimeType = "text/jme3material", iconBase = "com/jme3/gde/materials/jme-logo.png")
public class JMEMaterialDataObject extends AssetDataObject {
public JMEMaterialDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {

@ -1,15 +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="j3m"/>
<ext name="J3M"/>
<ext name="j3M"/>
<ext name="J3m"/>
<resolver mime="text/jme3material"/>
</file>
</MIME-resolver>

@ -1,109 +1,6 @@
<?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="Window">
<file name="com-jme3-gde-materials-multiview-MaterialEditorAction.instance">
<attr name="component" methodvalue="com.jme3.gde.materials.multiview.MaterialEditorTopComponent.findInstance"/>
<attr name="displayName" bundlevalue="com.jme3.gde.materials.multiview.Bundle#CTL_MaterialEditorAction"/>
<attr name="instanceCreate" methodvalue="org.openide.windows.TopComponent.openAction"/>
</file>
</folder-->
</folder>
<folder name="Loaders">
<folder name="text">
<folder name="jme3material">
<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-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="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="JMEMaterialDataLoader.instance">
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/com/jme3/gde/materials/jme-logo.png"/>
<attr name="dataObjectClass" stringvalue="com.jme3.gde.materials.JMEMaterialDataObject"/>
<attr name="instanceCreate" methodvalue="org.openide.loaders.DataLoaderPool.factory"/>
<attr name="mimeType" stringvalue="text/jme3material"/>
</file>
</folder>
</folder>
</folder>
</folder>
<folder name="Menu">
<folder name="Window">
<file name="MaterialEditorAction.shadow">
<attr name="originalFile" stringvalue="Actions/Window/com-jme3-gde-materials-multiview-MaterialEditorAction.instance"/>
</file>
</folder>
</folder>
<folder name="Services">
<folder name="MIMEResolver">
<file name="JMEMaterialResolver.xml" url="JMEMaterialResolver.xml">
<attr name="displayName" bundlevalue="com.jme3.gde.materials.Bundle#Services/MIMEResolver/JMEMaterialResolver.xml"/>
</file>
</folder>
</folder>
<folder name="Templates">
<folder name="Material">
<file name="Material.j3m" url="Material.j3m">
<attr name="displayName" bundlevalue="com.jme3.gde.materials.Bundle#Templates/Other/JMEMaterialTemplate.j3m"/>
<attr name="template" boolvalue="true"/>
</file>
</folder>
</folder>
<folder name="Windows2">
<folder name="Components">
<file name="MaterialEditorTopComponent.settings" url="MaterialEditorTopComponentSettings.xml"/>

@ -0,0 +1,7 @@
@TemplateRegistrations({
@TemplateRegistration(folder = "Material", content = "Material.j3m", displayName = "Empty Material file")
})
package com.jme3.gde.materials;
import org.netbeans.api.templates.TemplateRegistration;
import org.netbeans.api.templates.TemplateRegistrations;
Loading…
Cancel
Save