Use @MIMEResolver.Registration to register PythonResolver
authorJulien Enselme <jenselme@netbeans.org>
Wed, 23 Dec 2015 14:44:51 +0100
changeset 18357c77d5f5ec3b8
parent 18356 bbedcb3e351a
child 18358 f74866c6b46c
Use @MIMEResolver.Registration to register PythonResolver
python.editor/src/org/netbeans/modules/python/editor/Bundle.properties
python.editor/src/org/netbeans/modules/python/editor/PythonLanguage.java
python.editor/src/org/netbeans/modules/python/editor/file/PyDataObject.java
python.editor/src/org/netbeans/modules/python/editor/layer.xml
     1.1 --- a/python.editor/src/org/netbeans/modules/python/editor/Bundle.properties	Mon Dec 14 13:14:07 2015 -0600
     1.2 +++ b/python.editor/src/org/netbeans/modules/python/editor/Bundle.properties	Wed Dec 23 14:44:51 2015 +0100
     1.3 @@ -9,8 +9,6 @@
     1.4  Templates/Python/_package=Python Package
     1.5  Templates/Python/_test.py=Unit Test
     1.6  Templates/Python/_init.py=Package __init__ File
     1.7 -Services/MIMEResolver/PythonCompiledResolver.xml=PythonCompiled Files
     1.8 -Services/MIMEResolver/PythonResolver.xml=Python Files
     1.9  
    1.10  NoCommentFound=No comment found
    1.11  Documented=(documented)
     2.1 --- a/python.editor/src/org/netbeans/modules/python/editor/PythonLanguage.java	Mon Dec 14 13:14:07 2015 -0600
     2.2 +++ b/python.editor/src/org/netbeans/modules/python/editor/PythonLanguage.java	Wed Dec 23 14:44:51 2015 +0100
     2.3 @@ -41,7 +41,6 @@
     2.4  import org.netbeans.modules.csl.api.CodeCompletionHandler;
     2.5  import org.netbeans.modules.csl.api.DeclarationFinder;
     2.6  import org.netbeans.modules.csl.api.Formatter;
     2.7 -import org.netbeans.modules.csl.api.HintsProvider;
     2.8  import org.netbeans.modules.csl.api.IndexSearcher;
     2.9  import org.netbeans.modules.csl.api.InstantRenamer;
    2.10  import org.netbeans.modules.csl.api.KeystrokeHandler;
     3.1 --- a/python.editor/src/org/netbeans/modules/python/editor/file/PyDataObject.java	Mon Dec 14 13:14:07 2015 -0600
     3.2 +++ b/python.editor/src/org/netbeans/modules/python/editor/file/PyDataObject.java	Wed Dec 23 14:44:51 2015 +0100
     3.3 @@ -9,7 +9,6 @@
     3.4  import org.openide.awt.ActionReferences;
     3.5  import org.openide.filesystems.FileObject;
     3.6  import org.openide.filesystems.MIMEResolver;
     3.7 -import org.openide.loaders.DataObject;
     3.8  import org.openide.loaders.DataObjectExistsException;
     3.9  import org.openide.loaders.MultiDataObject;
    3.10  import org.openide.loaders.MultiFileLoader;
    3.11 @@ -20,17 +19,10 @@
    3.12  @Messages({
    3.13      "LBL_Py_LOADER=Files of Py"
    3.14  })
    3.15 -@MIMEResolver.ExtensionRegistration(
    3.16 -        displayName = "#LBL_Py_LOADER",
    3.17 -        mimeType = PythonMIMEResolver.PYTHON_MIME_TYPE,
    3.18 -        extension = {"py"},
    3.19 -        position = 183
    3.20 -)
    3.21 -@DataObject.Registration(
    3.22 -        mimeType = PythonMIMEResolver.PYTHON_MIME_TYPE,
    3.23 -        iconBase = "org/netbeans/modules/python/editor/resources/pyNode25.png",
    3.24 -        displayName = "#LBL_Py_LOADER",
    3.25 -        position = 300
    3.26 +@MIMEResolver.Registration(
    3.27 +    displayName="#LBL_Py_LOADER",
    3.28 +    resource="../PythonResolver.xml",
    3.29 +    position=300
    3.30  )
    3.31  @ActionReferences({
    3.32      @ActionReference(
     4.1 --- a/python.editor/src/org/netbeans/modules/python/editor/layer.xml	Mon Dec 14 13:14:07 2015 -0600
     4.2 +++ b/python.editor/src/org/netbeans/modules/python/editor/layer.xml	Wed Dec 23 14:44:51 2015 +0100
     4.3 @@ -221,15 +221,6 @@
     4.4          </folder>
     4.5      </folder>
     4.6      
     4.7 -    <folder name="Services">
     4.8 -        <folder name="MIMEResolver">
     4.9 -            <file name="PythonResolver.xml" url="PythonResolver.xml">
    4.10 -                <attr name="displayName" bundlevalue="org.netbeans.modules.python.editor.Bundle#Services/MIMEResolver/PythonResolver.xml"/>
    4.11 -                <attr name="position" intvalue="184"/>
    4.12 -            </file>
    4.13 -        </folder>
    4.14 -    </folder>
    4.15 -
    4.16      <folder name="Templates">
    4.17          <folder name="Python">
    4.18              <attr name="position" intvalue="1403"/>