- fix AssetPackBrowser position

- move AssetPackBrowser layer.xml to Annotations
experimental
Normen Hansen 10 years ago
parent 18747f0add
commit 643e88cbf7
  1. 1
      sdk/jme3-assetpack-support/manifest.mf
  2. 12
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/AssetPackBrowserTopComponentSettings.xml
  3. 11
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/AssetPackBrowserTopComponentWstcref.xml
  4. 2
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/AssetPackLoader.java
  5. 2
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddAssetAction.java
  6. 2
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddToProjectAction.java
  7. 2
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/browser/AssetPackBrowserTopComponent.form
  8. 12
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/browser/AssetPackBrowserTopComponent.java
  9. 49
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/layer.xml
  10. 9
      sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/wizards/CreateProjectWizardIterator.java

@ -2,7 +2,6 @@ Manifest-Version: 1.0
OpenIDE-Module: com.jme3.gde.assetpack OpenIDE-Module: com.jme3.gde.assetpack
OpenIDE-Module-Implementation-Version: 0 OpenIDE-Module-Implementation-Version: 0
OpenIDE-Module-Install: com/jme3/gde/assetpack/Installer.class OpenIDE-Module-Install: com/jme3/gde/assetpack/Installer.class
OpenIDE-Module-Layer: com/jme3/gde/assetpack/layer.xml
OpenIDE-Module-Localizing-Bundle: com/jme3/gde/assetpack/Bundle.properties OpenIDE-Module-Localizing-Bundle: com/jme3/gde/assetpack/Bundle.properties
OpenIDE-Module-Requires: org.openide.windows.WindowManager OpenIDE-Module-Requires: org.openide.windows.WindowManager

@ -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 settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
<settings version="1.0">
<module name="com.jme3.gde.assetpack" spec="1.0"/>
<instanceof class="org.openide.windows.TopComponent"/>
<instanceof class="com.jme3.gde.assetpack.browser.AssetPackBrowserTopComponent"/>
<instance class="com.jme3.gde.assetpack.browser.AssetPackBrowserTopComponent" method="getDefault"/>
</settings>

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE tc-ref PUBLIC "-//NetBeans//DTD Top Component in Mode Properties 2.0//EN" "http://www.netbeans.org/dtds/tc-ref2_0.dtd">
<tc-ref version="2.0" >
<module name="com.jme3.gde.assetpack" spec="1.0"/>
<tc-id id="AssetPackBrowserTopComponent"/>
<state opened="true"/>
</tc-ref>

@ -96,7 +96,7 @@ public class AssetPackLoader {
if (model != null && node != null) { if (model != null && node != null) {
node.attachChild(model); node.attachChild(model);
} else { } else {
Logger.getLogger(AssetPackLoader.class.getName()).log(Level.WARNING, "Error loading model"); Logger.getLogger(AssetPackLoader.class.getName()).log(Level.INFO, "Error loading model");
} }
} }
if (node != null) { if (node != null) {

@ -53,7 +53,7 @@ public final class AddAssetAction implements Action {
SceneComposerTopComponent.findInstance().addModel(model); SceneComposerTopComponent.findInstance().addModel(model);
AssetPackLoader.addModelFiles(pm, scenePm, conf); AssetPackLoader.addModelFiles(pm, scenePm, conf);
} else { } else {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Error loading model"); Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Error loading model");
} }
} else { } else {
AssetConfiguration conf = new AssetConfiguration(assetElement); AssetConfiguration conf = new AssetConfiguration(assetElement);

@ -71,7 +71,7 @@ public final class AddToProjectAction implements Action {
DialogDisplayer.getDefault().notifyLater(msg); DialogDisplayer.getDefault().notifyLater(msg);
} }
} else { } else {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Error loading model"); Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Error loading model");
} }
} else { } else {
AssetConfiguration conf = new AssetConfiguration(assetElement); AssetConfiguration conf = new AssetConfiguration(assetElement);

@ -1,4 +1,4 @@
<?xml version="1.1" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues> <AuxValues>

@ -14,6 +14,8 @@ import org.openide.windows.WindowManager;
//import org.openide.util.ImageUtilities; //import org.openide.util.ImageUtilities;
import org.netbeans.api.settings.ConvertAsProperties; import org.netbeans.api.settings.ConvertAsProperties;
import org.openide.actions.CopyAction; import org.openide.actions.CopyAction;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.explorer.ExplorerManager; import org.openide.explorer.ExplorerManager;
import org.openide.explorer.ExplorerUtils; import org.openide.explorer.ExplorerUtils;
import org.openide.explorer.view.BeanTreeView; import org.openide.explorer.view.BeanTreeView;
@ -25,6 +27,16 @@ import org.openide.util.actions.SystemAction;
*/ */
@ConvertAsProperties(dtd = "-//com.jme3.gde.assetpack.browser//AssetPackBrowser//EN", @ConvertAsProperties(dtd = "-//com.jme3.gde.assetpack.browser//AssetPackBrowser//EN",
autostore = false) autostore = false)
@TopComponent.Description(
preferredID = "AssetPackBrowserTopComponent",
iconBase="com/jme3/gde/assetpack/icons/assetpack.png",
persistenceType = TopComponent.PERSISTENCE_ALWAYS)
@TopComponent.Registration(mode = "explorer", openAtStartup = true, position = 500)
@ActionID(category = "Window", id = "com.jme3.gde.assetpack.browser.AssetPackBrowserTopComponent")
@ActionReference(path = "Menu/Window" /*, position = 333 */)
@TopComponent.OpenActionRegistration(
displayName = "AssetPackBrowser",
preferredID = "AssetPackBrowserTopComponent")
@SuppressWarnings({"unchecked", "rawtypes"}) @SuppressWarnings({"unchecked", "rawtypes"})
public final class AssetPackBrowserTopComponent extends TopComponent implements ExplorerManager.Provider { public final class AssetPackBrowserTopComponent extends TopComponent implements ExplorerManager.Provider {

@ -1,49 +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="Window">
<file name="com-jme3-gde-assetpack-browser-AssetPackBrowserAction.instance">
<attr name="component" methodvalue="com.jme3.gde.assetpack.browser.AssetPackBrowserTopComponent.findInstance"/>
<attr name="displayName" bundlevalue="com.jme3.gde.assetpack.browser.Bundle#CTL_AssetPackBrowserAction"/>
<attr name="instanceCreate" methodvalue="org.openide.windows.TopComponent.openAction"/>
</file>
</folder>
</folder>
<folder name="Templates">
<folder name="Project">
<folder name="Asset Pack">
<file name="AssetPackProject.zip" url="AssetPackProject.zip">
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/com/jme3/gde/assetpack/icons/assetpack.png"/>
<attr name="displayName" bundlevalue="com.jme3.gde.assetpack.Bundle#Templates/Project/AssetPack/AssetPackProject.zip"/>
<attr name="instantiatingIterator" methodvalue="com.jme3.gde.assetpack.project.wizards.CreateProjectWizardIterator.createIterator"/>
<attr name="instantiatingWizardURL" urlvalue="nbresloc:/com/jme3/gde/assetpack/project/AssetPackProjectDescription.html"/>
<attr name="template" boolvalue="true"/>
</file>
</folder>
</folder>
</folder>
<folder name="Menu">
<folder name="File">
<file name="com-jme3-gde-assetpack-project-wizards-ImportAssetAction.shadow">
<attr name="originalFile" stringvalue="Actions/AssetPack/com-jme3-gde-assetpack-project-wizards-ImportAssetAction.instance"/>
<attr name="position" intvalue="0"/>
</file>
</folder>
<folder name="Window">
<file name="AssetPackBrowserAction.shadow">
<attr name="originalFile" stringvalue="Actions/Window/com-jme3-gde-assetpack-browser-AssetPackBrowserAction.instance"/>
</file>
</folder>
</folder>
<folder name="Windows2">
<folder name="Components">
<file name="AssetPackBrowserTopComponent.settings" url="AssetPackBrowserTopComponentSettings.xml"/>
</folder>
<folder name="Modes">
<folder name="explorer">
<file name="AssetPackBrowserTopComponent.wstcref" url="AssetPackBrowserTopComponentWstcref.xml"/>
</folder>
</folder>
</folder>
</filesystem>

@ -18,6 +18,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream; import java.util.zip.ZipInputStream;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import org.netbeans.api.templates.TemplateRegistration;
import org.netbeans.spi.project.ui.support.ProjectChooser; import org.netbeans.spi.project.ui.support.ProjectChooser;
import org.netbeans.spi.project.ui.templates.support.Templates; import org.netbeans.spi.project.ui.templates.support.Templates;
import org.openide.WizardDescriptor; import org.openide.WizardDescriptor;
@ -28,8 +29,12 @@ import org.openide.xml.XMLUtil;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
// An example action demonstrating how the wizard could be called from within @TemplateRegistration(folder = "Project/Asset Pack",
// your code. You can copy-paste the code below wherever you need. content = "/com/jme3/gde/assetpack/AssetPackProject.zip",
iconBase = "com/jme3/gde/assetpack/icons/assetpack.png",
displayName = "com.jme3.gde.assetpack.Bundle#Templates/Project/AssetPack/AssetPackProject.zip",
description = "/com/jme3/gde/assetpack/project/AssetPackProjectDescription.html"
)
@SuppressWarnings({"unchecked", "rawtypes"}) @SuppressWarnings({"unchecked", "rawtypes"})
public final class CreateProjectWizardIterator implements WizardDescriptor.InstantiatingIterator { public final class CreateProjectWizardIterator implements WizardDescriptor.InstantiatingIterator {

Loading…
Cancel
Save