This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 210382
Collapse All | Expand All

(-)a/groovy.editor/nbproject/project.xml (-5 lines)
Lines 367-377 Link Here
367
                        <compile-dependency/>
367
                        <compile-dependency/>
368
                    </test-dependency>
368
                    </test-dependency>
369
                    <test-dependency>
369
                    <test-dependency>
370
                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
371
                        <recursive/>
372
                        <compile-dependency/>
373
                    </test-dependency>
374
                    <test-dependency>
375
                        <code-name-base>org.netbeans.modules.projectui</code-name-base>
370
                        <code-name-base>org.netbeans.modules.projectui</code-name-base>
376
                        <compile-dependency/>
371
                        <compile-dependency/>
377
                    </test-dependency>
372
                    </test-dependency>
(-)a/groovy.editor/src/org/netbeans/modules/groovy/editor/api/parser/GroovyLanguage.java (-6 / +25 lines)
Lines 71-80 Link Here
71
import org.netbeans.modules.groovy.editor.api.StructureAnalyzer;
71
import org.netbeans.modules.groovy.editor.api.StructureAnalyzer;
72
import org.netbeans.modules.groovy.editor.api.completion.CompletionHandler;
72
import org.netbeans.modules.groovy.editor.api.completion.CompletionHandler;
73
import org.netbeans.modules.groovy.editor.api.lexer.GroovyTokenId;
73
import org.netbeans.modules.groovy.editor.api.lexer.GroovyTokenId;
74
import static org.netbeans.modules.groovy.editor.api.parser.GroovyLanguage.*;
74
import org.netbeans.modules.groovy.editor.hints.infrastructure.GroovyHintsProvider;
75
import org.netbeans.modules.groovy.editor.hints.infrastructure.GroovyHintsProvider;
75
import org.netbeans.modules.parsing.spi.Parser;
76
import org.netbeans.modules.parsing.spi.Parser;
76
import org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexerFactory;
77
import org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexerFactory;
77
import org.netbeans.modules.parsing.spi.indexing.PathRecognizerRegistration;
78
import org.netbeans.modules.parsing.spi.indexing.PathRecognizerRegistration;
79
import org.openide.awt.ActionID;
80
import org.openide.awt.ActionReference;
81
import org.openide.awt.ActionReferences;
78
import org.openide.filesystems.MIMEResolver;
82
import org.openide.filesystems.MIMEResolver;
79
import org.openide.util.Lookup;
83
import org.openide.util.Lookup;
80
import org.openide.windows.TopComponent;
84
import org.openide.windows.TopComponent;
Lines 88-111 Link Here
88
@MIMEResolver.ExtensionRegistration(
92
@MIMEResolver.ExtensionRegistration(
89
    displayName="#GroovyResolver",
93
    displayName="#GroovyResolver",
90
    extension={ "groovy" },
94
    extension={ "groovy" },
91
    mimeType="text/x-groovy",
95
    mimeType=GROOVY_MIME_TYPE,
92
    position=281
96
    position=281
93
)
97
)
94
@LanguageRegistration(mimeType="text/x-groovy", useMultiview=true)
98
@LanguageRegistration(mimeType=GROOVY_MIME_TYPE, useMultiview=true)
95
@PathRecognizerRegistration(mimeTypes="text/x-groovy", sourcePathIds=ClassPath.SOURCE, libraryPathIds={}, binaryLibraryPathIds={}) //NOI18N
99
@PathRecognizerRegistration(mimeTypes=GROOVY_MIME_TYPE, sourcePathIds=ClassPath.SOURCE, libraryPathIds={}, binaryLibraryPathIds={}) //NOI18N
100
@ActionReferences({
101
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.OpenAction"), path = ACTIONS, position = 100),
102
    @ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), path = ACTIONS, position = 300, separatorBefore = 200),
103
    @ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), path = ACTIONS, position = 400),
104
    @ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.PasteAction"), path = ACTIONS, position = 500, separatorAfter = 600),
105
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.NewAction"), path = ACTIONS, position = 700),
106
    @ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), path = ACTIONS, position = 800),
107
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.RenameAction"), path = ACTIONS, position = 900, separatorAfter = 1000),
108
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), path = ACTIONS, position = 1100, separatorAfter = 1200),
109
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), path = ACTIONS, position = 1300, separatorAfter = 1400),
110
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = ACTIONS, position = 1500),
111
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = ACTIONS, position = 1600)
112
})
96
public class GroovyLanguage extends DefaultLanguageConfig {
113
public class GroovyLanguage extends DefaultLanguageConfig {
97
114
115
    public static final String GROOVY_MIME_TYPE ="text/x-groovy";
116
    public static final String ACTIONS = "Loaders/"+GROOVY_MIME_TYPE+"/Actions";
117
    
98
    // Copy of groovy/support/resources icon because some API change caused
118
    // Copy of groovy/support/resources icon because some API change caused
99
    // that it's not possible to refer to resource from different module
119
    // that it's not possible to refer to resource from different module
100
    private static final String GROOVY_FILE_ICON_16x16 = "org/netbeans/modules/groovy/editor/resources/GroovyFile16x16.png";
120
    private static final String GROOVY_FILE_ICON_16x16 = "org/netbeans/modules/groovy/editor/resources/GroovyFile16x16.png";
101
121
    
102
103
    public GroovyLanguage() {
122
    public GroovyLanguage() {
104
    }
123
    }
105
124
106
    @MultiViewElement.Registration(
125
    @MultiViewElement.Registration(
107
        displayName = "#CTL_SourceTabCaption",
126
        displayName = "#CTL_SourceTabCaption",
108
        mimeType = "text/x-groovy",
127
        mimeType = GROOVY_MIME_TYPE,
109
        iconBase = GROOVY_FILE_ICON_16x16,
128
        iconBase = GROOVY_FILE_ICON_16x16,
110
        persistenceType = TopComponent.PERSISTENCE_ONLY_OPENED,
129
        persistenceType = TopComponent.PERSISTENCE_ONLY_OPENED,
111
        preferredID = "groovy.source",
130
        preferredID = "groovy.source",
(-)a/groovy.editor/src/org/netbeans/modules/groovy/editor/resources/layer.xml (-75 / +6 lines)
Lines 102-183 Link Here
102
    </folder>
102
    </folder>
103
103
104
    <folder name="Loaders">
104
    <folder name="Loaders">
105
        <folder name="text">
105
       <folder name="text">
106
            <folder name="x-groovy">
106
          <folder name="x-groovy">
107
                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/groovy/support/resources/GroovyFile16x16.png"/>
107
              <!-- icon should be keep because groovy.editor use LanguageRegistration and not DataObject Registration-->
108
                <attr name="iconBase" stringvalue="org/netbeans/modules/groovy/support/resources/GroovyFile16x16.png"/>
108
              <attr name="iconBase" stringvalue="org/netbeans/modules/groovy/editor/resources/GroovyFile16x16.png"/>
109
                <folder name="Actions">
109
          </folder>
110
                    <file name="CopyAction.shadow">
110
       </folder>
111
                        <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CopyAction.instance"/>
112
                        <attr name="position" intvalue="400"/>
113
                    </file>
114
                    <file name="CutAction.shadow">
115
                        <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CutAction.instance"/>
116
                        <attr name="position" intvalue="300"/>
117
                    </file>
118
                    <file name="DeleteAction.shadow">
119
                        <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-DeleteAction.instance"/>
120
                        <attr name="position" intvalue="800"/>
121
                    </file>
122
                    <file name="FileSystemAction.shadow">
123
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-FileSystemAction.instance"/>
124
                        <attr name="position" intvalue="1300"/>
125
                    </file>
126
                    <file name="NewAction.shadow">
127
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-NewAction.instance"/>
128
                        <attr name="position" intvalue="700"/>
129
                    </file>
130
                    <file name="OpenAction.shadow">
131
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-OpenAction.instance"/>
132
                        <attr name="position" intvalue="100"/>
133
                    </file>
134
                    <file name="PasteAction.shadow">
135
                        <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-PasteAction.instance"/>
136
                        <attr name="position" intvalue="500"/>
137
                    </file>
138
                    <file name="PropertiesAction.shadow">
139
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-PropertiesAction.instance"/>
140
                        <attr name="position" intvalue="1600"/>
141
                    </file>
142
                    <file name="RenameAction.shadow">
143
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-RenameAction.instance"/>
144
                        <attr name="position" intvalue="900"/>
145
                    </file>
146
                    <file name="SaveAsTemplateAction.shadow">
147
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAsTemplateAction.instance"/>
148
                        <attr name="position" intvalue="1100"/>
149
                    </file>
150
                    <file name="Separator1.instance">
151
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
152
                        <attr name="position" intvalue="200"/>
153
                    </file>     
154
                    <file name="Separator2.instance">
155
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
156
                        <attr name="position" intvalue="600"/>
157
                    </file>
158
                    <file name="Separator3.instance">
159
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
160
                        <attr name="position" intvalue="1000"/>
161
                    </file>
162
                    <file name="Separator4.instance">
163
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
164
                        <attr name="position" intvalue="1200"/>
165
                    </file>
166
                    <file name="Separator5.instance">
167
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
168
                        <attr name="position" intvalue="1400"/>
169
                    </file> 
170
                     
171
                     
172
                    <file name="ToolsAction.shadow">
173
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-ToolsAction.instance"/>
174
                        <attr name="position" intvalue="1500"/>
175
                    </file>
176
                </folder>            
177
            </folder>
178
        </folder>
179
    </folder>
111
    </folder>
180
181
    <folder name="org-netbeans-api-project-libraries">
112
    <folder name="org-netbeans-api-project-libraries">
182
        <folder name="Libraries">
113
        <folder name="Libraries">
183
            <file name="groovy-all.xml" url="groovy-all.xml">
114
            <file name="groovy-all.xml" url="groovy-all.xml">
(-)a/groovy.grailsproject/nbproject/project.xml (-5 lines)
Lines 323-333 Link Here
323
                        <compile-dependency/>
323
                        <compile-dependency/>
324
                    </test-dependency>
324
                    </test-dependency>
325
                    <test-dependency>
325
                    <test-dependency>
326
                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
327
                        <recursive/>
328
                        <compile-dependency/>
329
                    </test-dependency>
330
                    <test-dependency>
331
                        <code-name-base>org.netbeans.modules.projectui</code-name-base>
326
                        <code-name-base>org.netbeans.modules.projectui</code-name-base>
332
                        <compile-dependency/>
327
                        <compile-dependency/>
333
                    </test-dependency>
328
                    </test-dependency>
(-)a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/actions/Bundle.properties (-64 / +58 lines)
Lines 1-64 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
2
#
3
# Copyright 2010 Oracle and/or its affiliates. All rights reserved.
3
# Copyright 2010 Oracle and/or its affiliates. All rights reserved.
4
#
4
#
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
# Other names may be trademarks of their respective owners.
6
# Other names may be trademarks of their respective owners.
7
#
7
#
8
# The contents of this file are subject to the terms of either the GNU
8
# The contents of this file are subject to the terms of either the GNU
9
# General Public License Version 2 only ("GPL") or the Common
9
# General Public License Version 2 only ("GPL") or the Common
10
# Development and Distribution License("CDDL") (collectively, the
10
# Development and Distribution License("CDDL") (collectively, the
11
# "License"). You may not use this file except in compliance with the
11
# "License"). You may not use this file except in compliance with the
12
# License. You can obtain a copy of the License at
12
# License. You can obtain a copy of the License at
13
# http://www.netbeans.org/cddl-gplv2.html
13
# http://www.netbeans.org/cddl-gplv2.html
14
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
14
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
# specific language governing permissions and limitations under the
15
# specific language governing permissions and limitations under the
16
# License.  When distributing the software, include this License Header
16
# License.  When distributing the software, include this License Header
17
# Notice in each file and include the License file at
17
# Notice in each file and include the License file at
18
# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
18
# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
19
# particular file as subject to the "Classpath" exception as provided
19
# particular file as subject to the "Classpath" exception as provided
20
# by Oracle in the GPL Version 2 section of the License file that
20
# by Oracle in the GPL Version 2 section of the License file that
21
# accompanied this code. If applicable, add the following below the
21
# accompanied this code. If applicable, add the following below the
22
# License Header, with the fields enclosed by brackets [] replaced by
22
# License Header, with the fields enclosed by brackets [] replaced by
23
# your own identifying information:
23
# your own identifying information:
24
# "Portions Copyrighted [year] [name of copyright owner]"
24
# "Portions Copyrighted [year] [name of copyright owner]"
25
#
25
#
26
# If you wish your version of this file to be governed by only the CDDL
26
# If you wish your version of this file to be governed by only the CDDL
27
# or only the GPL Version 2, indicate your decision by adding
27
# or only the GPL Version 2, indicate your decision by adding
28
# "[Contributor] elects to include this software in this distribution
28
# "[Contributor] elects to include this software in this distribution
29
# under the [CDDL or GPL Version 2] license." If you do not indicate a
29
# under the [CDDL or GPL Version 2] license." If you do not indicate a
30
# single choice of license, a recipient has the option to distribute
30
# single choice of license, a recipient has the option to distribute
31
# your version of this file under either the CDDL, the GPL Version 2 or
31
# your version of this file under either the CDDL, the GPL Version 2 or
32
# to extend the choice of license to its licensees as provided above.
32
# to extend the choice of license to its licensees as provided above.
33
# However, if you add GPL Version 2 code and therefore, elected the GPL
33
# However, if you add GPL Version 2 code and therefore, elected the GPL
34
# Version 2 license, then the option applies only if the new code is
34
# Version 2 license, then the option applies only if the new code is
35
# made subject to such option by the copyright holder.
35
# made subject to such option by the copyright holder.
36
#
36
#
37
# Contributor(s):
37
# Contributor(s):
38
#
38
#
39
# Portions Copyrighted 2008 Sun Microsystems, Inc.
39
# Portions Copyrighted 2008 Sun Microsystems, Inc.
40
40
41
CTL_GotoControllerAction=Go to Grails Con&troller
41
LBL_process_problem=There was a problem creating the grails process:
42
CTL_GotoDomainClassAction=Go to Grails Domain class
42
43
CTL_GotoViewAction=Go to Grails Vi&ew
43
44
LBL_process_problem=There was a problem creating the grails process:
44
CTL_ManagePluginsAction=Grails Plugins...
45
45
CTL_Close=Close
46
CTL_GenerateAllAction=Generate All
46
CTL_PluginTitle=Grails Plugins
47
CTL_GenerateViewsAction=Generate Views
47
48
48
MSG_Runtime_Not_Configured=<html>The Grails Home has not been set.<br>\
49
CTL_ManagePluginsAction=Grails Plugins...
49
Use menu <b>Tools/Options/Groovy</b> to set the environment.
50
CTL_Close=Close
50
51
CTL_PluginTitle=Grails Plugins
51
52
52
LBL_ResolvePlugins=Resolve Plugins
53
MSG_Runtime_Not_Configured=<html>The Grails Home has not been set.<br>\
53
54
Use menu <b>Tools/Options/Groovy</b> to set the environment.
54
#Run/Debug Grails Command...
55
55
56
56
LBL_ResolvingPluginsLabel=Resolving Project Plugins ...
57
LBL_ResolvePlugins=Resolve Plugins
57
LBL_Resolving_Project_Plugins=Resolving Project Plugins
58
58
LBL_Resolving_Project_Plugins_progress=Resolving Project Plugins
59
CTL_GrailsCommandAction=Run/Debug Grails Command...
60
#Run/Debug Grails Command...
61
62
LBL_ResolvingPluginsLabel=Resolving Project Plugins ...
63
LBL_Resolving_Project_Plugins=Resolving Project Plugins
64
LBL_Resolving_Project_Plugins_progress=Resolving Project Plugins
(-)a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/actions/GenerateAllAction.java (-2 / +11 lines)
Lines 41-52 Link Here
41
 */
41
 */
42
package org.netbeans.modules.groovy.grailsproject.actions;
42
package org.netbeans.modules.groovy.grailsproject.actions;
43
43
44
import org.openide.util.NbBundle;
44
import static org.netbeans.modules.groovy.editor.api.parser.GroovyLanguage.ACTIONS;
45
import static org.netbeans.modules.groovy.grailsproject.actions.Bundle.CTL_GenerateAllAction;
46
import org.openide.awt.ActionID;
47
import org.openide.awt.ActionReference;
48
import org.openide.awt.ActionRegistration;
49
import org.openide.util.NbBundle.Messages;
45
50
51
@Messages("CTL_GenerateAllAction=Generate All")
52
@ActionID(id = "org.netbeans.modules.groovy.grailsproject.actions.GenerateAllAction", category = "Build")
53
@ActionRegistration(lazy = false, displayName = "#CTL_GenerateAllAction")
54
@ActionReference(path = ACTIONS, position = 20,separatorAfter=50)
46
public final class GenerateAllAction extends GenerateAction {
55
public final class GenerateAllAction extends GenerateAction {
47
56
48
    public GenerateAllAction() {
57
    public GenerateAllAction() {
49
        super("generate-all", NbBundle.getMessage(GenerateAllAction.class, "CTL_GenerateAllAction"));
58
        super("generate-all", CTL_GenerateAllAction());
50
    }
59
    }
51
60
52
}
61
}
(-)a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/actions/GenerateViewsAction.java (-2 / +12 lines)
Lines 42-57 Link Here
42
42
43
package org.netbeans.modules.groovy.grailsproject.actions;
43
package org.netbeans.modules.groovy.grailsproject.actions;
44
44
45
import org.openide.util.NbBundle;
45
import static org.netbeans.modules.groovy.editor.api.parser.GroovyLanguage.ACTIONS;
46
import static org.netbeans.modules.groovy.grailsproject.actions.Bundle.CTL_GenerateViewsAction;
47
import org.openide.awt.ActionID;
48
import org.openide.awt.ActionReference;
49
import org.openide.awt.ActionRegistration;
50
import org.openide.util.NbBundle.Messages;
46
51
47
/**
52
/**
48
 *
53
 *
49
 * @author Petr Hejl
54
 * @author Petr Hejl
50
 */
55
 */
56
@Messages("CTL_GenerateViewsAction=Generate Views")
57
@ActionID(id = "org.netbeans.modules.groovy.grailsproject.actions.GenerateViewsAction", category = "Build")
58
@ActionRegistration(lazy = false, displayName = "#CTL_GenerateViewsAction")
59
@ActionReference(path = ACTIONS, position = 0,separatorBefore=-100)
60
51
public final class GenerateViewsAction extends GenerateAction {
61
public final class GenerateViewsAction extends GenerateAction {
52
62
53
    public GenerateViewsAction() {
63
    public GenerateViewsAction() {
54
        super("generate-views", NbBundle.getMessage(GenerateViewsAction.class, "CTL_GenerateViewsAction"));
64
        super("generate-views", CTL_GenerateViewsAction());
55
    }
65
    }
56
66
57
}
67
}
(-)a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/actions/GotoControllerAction.java (-2 / +15 lines)
Lines 45-56 Link Here
45
import javax.swing.text.JTextComponent;
45
import javax.swing.text.JTextComponent;
46
import org.netbeans.editor.BaseAction;
46
import org.netbeans.editor.BaseAction;
47
import org.netbeans.modules.groovy.grailsproject.NavigationSupport;
47
import org.netbeans.modules.groovy.grailsproject.NavigationSupport;
48
import org.openide.util.NbBundle;
48
import static org.netbeans.modules.groovy.grailsproject.actions.Bundle.CTL_GotoControllerAction;
49
import org.openide.awt.ActionID;
50
import org.openide.awt.ActionReference;
51
import org.openide.awt.ActionReferences;
52
import org.openide.awt.ActionRegistration;
53
import org.openide.util.NbBundle.Messages;
54
55
@Messages("CTL_GotoControllerAction=Go to Grails Con&troller")
56
@ActionID(id = "org.netbeans.modules.groovy.grailsproject.actions.GotoControllerAction", category = "Groovy")
57
@ActionRegistration(lazy = false, displayName = "#CTL_GotoControllerAction")
58
@ActionReferences(value = {
59
    @ActionReference(path = "Menu/GoTo", position = 550),
60
    @ActionReference(path = "Editors/text/x-groovy/Popup/goto", position = 150),
61
    @ActionReference(path = "Editors/text/x-gsp/Popup/goto", position = 150)})
49
62
50
public final class GotoControllerAction extends BaseAction {
63
public final class GotoControllerAction extends BaseAction {
51
64
52
    public GotoControllerAction() {
65
    public GotoControllerAction() {
53
        super(NbBundle.getMessage(GotoViewAction.class, "CTL_GotoControllerAction")); // NOI18N
66
        super(CTL_GotoControllerAction()); // NOI18N
54
    }
67
    }
55
68
56
    @Override
69
    @Override
(-)a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/actions/GotoDomainClassAction.java (-2 / +8 lines)
Lines 45-56 Link Here
45
import javax.swing.text.JTextComponent;
45
import javax.swing.text.JTextComponent;
46
import org.netbeans.editor.BaseAction;
46
import org.netbeans.editor.BaseAction;
47
import org.netbeans.modules.groovy.grailsproject.NavigationSupport;
47
import org.netbeans.modules.groovy.grailsproject.NavigationSupport;
48
import org.openide.util.NbBundle;
48
import static org.netbeans.modules.groovy.grailsproject.actions.Bundle.CTL_GotoControllerAction;
49
import org.openide.awt.ActionID;
50
import org.openide.awt.ActionRegistration;
51
import org.openide.util.NbBundle.Messages;
49
52
53
@Messages("CTL_GotoDomainClassAction=Go to Grails Domain class")
54
@ActionID(id = "org.netbeans.modules.groovy.grailsproject.actions.GotoDomainClassAction", category = "Groovy")
55
@ActionRegistration(lazy = false, displayName = "#CTL_GotoDomainClassAction")
50
public final class GotoDomainClassAction extends BaseAction {
56
public final class GotoDomainClassAction extends BaseAction {
51
57
52
    public GotoDomainClassAction() {
58
    public GotoDomainClassAction() {
53
        super(NbBundle.getMessage(GotoViewAction.class, "CTL_GotoDomainClassAction")); // NOI18N
59
        super(CTL_GotoControllerAction()); // NOI18N
54
    }
60
    }
55
61
56
    @Override
62
    @Override
(-)a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/actions/GotoViewAction.java (-2 / +15 lines)
Lines 45-56 Link Here
45
import javax.swing.text.JTextComponent;
45
import javax.swing.text.JTextComponent;
46
import org.netbeans.editor.BaseAction;
46
import org.netbeans.editor.BaseAction;
47
import org.netbeans.modules.groovy.grailsproject.NavigationSupport;
47
import org.netbeans.modules.groovy.grailsproject.NavigationSupport;
48
import org.openide.util.NbBundle;
48
import static org.netbeans.modules.groovy.grailsproject.actions.Bundle.CTL_GotoViewAction;
49
import org.openide.awt.ActionID;
50
import org.openide.awt.ActionReference;
51
import org.openide.awt.ActionReferences;
52
import org.openide.awt.ActionRegistration;
53
import org.openide.util.NbBundle.Messages;
54
55
@Messages("CTL_GotoViewAction=Go to Grails Vi&ew")
56
@ActionID(id = "org.netbeans.modules.groovy.grailsproject.actions.GotoViewAction", category = "Groovy")
57
@ActionRegistration(lazy = false, displayName = "#CTL_GotoViewAction")
58
@ActionReferences(value = {
59
    @ActionReference(path = "Menu/GoTo", position = 575),
60
    @ActionReference(path = "Editors/text/x-groovy/Popup/goto", position = 100),
61
    @ActionReference(path = "Editors/text/x-gsp/Popup/goto", position = 100)})
49
62
50
public final class GotoViewAction extends BaseAction {
63
public final class GotoViewAction extends BaseAction {
51
64
52
    public GotoViewAction() {
65
    public GotoViewAction() {
53
        super(NbBundle.getMessage(GotoViewAction.class, "CTL_GotoViewAction")); // NOI18N
66
        super(CTL_GotoViewAction()); // NOI18N
54
    }
67
    }
55
68
56
    @Override
69
    @Override
(-)a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/actions/GrailsCommandAction.java (-3 / +10 lines)
Lines 48-67 Link Here
48
import org.netbeans.api.extexecution.ExecutionService;
48
import org.netbeans.api.extexecution.ExecutionService;
49
import org.netbeans.api.project.ProjectInformation;
49
import org.netbeans.api.project.ProjectInformation;
50
import org.netbeans.modules.groovy.grails.api.ExecutionSupport;
50
import org.netbeans.modules.groovy.grails.api.ExecutionSupport;
51
import org.netbeans.modules.groovy.grails.api.GrailsPlatform;
51
import org.netbeans.modules.groovy.grails.api.GrailsProjectConfig;
52
import org.netbeans.modules.groovy.grails.api.GrailsProjectConfig;
52
import org.netbeans.modules.groovy.grails.api.GrailsPlatform;
53
import org.netbeans.modules.groovy.grailsproject.GrailsProject;
53
import org.netbeans.modules.groovy.grailsproject.GrailsProject;
54
import org.netbeans.modules.groovy.grailsproject.GrailsServerState;
54
import org.netbeans.modules.groovy.grailsproject.GrailsServerState;
55
import static org.netbeans.modules.groovy.grailsproject.actions.Bundle.CTL_GrailsCommandAction;
55
import org.netbeans.modules.groovy.grailsproject.commands.GrailsCommandChooser;
56
import org.netbeans.modules.groovy.grailsproject.commands.GrailsCommandChooser;
56
import org.netbeans.modules.groovy.grailsproject.commands.GrailsCommandSupport;
57
import org.netbeans.modules.groovy.grailsproject.commands.GrailsCommandSupport;
58
import org.openide.awt.ActionID;
59
import org.openide.awt.ActionRegistration;
57
import org.openide.util.HelpCtx;
60
import org.openide.util.HelpCtx;
58
import org.openide.util.NbBundle;
61
import org.openide.util.NbBundle.Messages;
59
import org.openide.util.actions.CallableSystemAction;
62
import org.openide.util.actions.CallableSystemAction;
60
63
61
/**
64
/**
62
 *
65
 *
63
 * @author Petr Hejl
66
 * @author Petr Hejl
64
 */
67
 */
68
@Messages("CTL_GrailsCommandAction=Run/Debug Grails Command...")
69
@ActionID(id = "org.netbeans.modules.groovy.grailsproject.actions.GrailsCommandAction", category = "Groovy")
70
@ActionRegistration(lazy = false, displayName = "#CTL_GrailsCommandAction")
71
65
public class GrailsCommandAction extends CallableSystemAction {
72
public class GrailsCommandAction extends CallableSystemAction {
66
73
67
    @Override
74
    @Override
Lines 167-173 Link Here
167
    
174
    
168
    @Override
175
    @Override
169
    public String getName() {
176
    public String getName() {
170
        return NbBundle.getMessage(GrailsCommandAction.class, "CTL_GrailsCommandAction");
177
        return CTL_GrailsCommandAction();
171
    }
178
    }
172
179
173
}
180
}
(-)a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/resources/layer.xml (-71 lines)
Lines 1-55 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
2
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
3
<filesystem>
3
<filesystem>
4
    <folder name="Actions">
5
        <folder name="Build">
6
            <file name="org-netbeans-modules-groovy-grailsproject-actions-GenerateViewsAction.instance"/>
7
            <file name="org-netbeans-modules-groovy-grailsproject-actions-GenerateAllAction.instance"/>
8
        </folder>
9
        <folder name="Groovy">
10
            <file name="org-netbeans-modules-groovy-grailsproject-actions-GotoControllerAction.instance"/>
11
            <file name="org-netbeans-modules-groovy-grailsproject-actions-GotoDomainClassAction.instance"/>
12
            <file name="org-netbeans-modules-groovy-grailsproject-actions-GotoViewAction.instance"/>
13
            <file name="org-netbeans-modules-groovy-grailsproject-actions-GrailsCommandAction.instance"/>
14
        </folder>
15
    </folder>
16
17
    <folder name="Loaders">
18
        <folder name="text">
19
            <folder name="x-groovy">
20
                <folder name="Actions">
21
                    <file name="org-netbeans-modules-groovy-grailsproject-actions-GenerateViewsAction.shadow">
22
                        <attr name="originalFile" stringvalue="Actions/Build/org-netbeans-modules-groovy-grailsproject-actions-GenerateViewsAction.instance"/>
23
                        <attr name="position" intvalue="0"/>
24
                    </file>
25
                    <file name="org-netbeans-modules-groovy-grailsproject-actions-GenerateAllAction.shadow">
26
                        <attr name="originalFile" stringvalue="Actions/Build/org-netbeans-modules-groovy-grailsproject-actions-GenerateAllAction.instance"/>
27
                        <attr name="position" intvalue="20"/>
28
                    </file>
29
                    <file name="org-netbeans-modules-groovy-grailsproject-actions-separatorAfter.instance">
30
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
31
                        <attr name="position" intvalue="50"/>
32
                    </file>
33
                    <file name="org-netbeans-modules-groovy-grailsproject-actions-separatorBefore.instance">
34
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
35
                        <attr name="position" intvalue="-100"/>
36
                    </file>
37
                </folder>
38
            </folder>
39
        </folder>
40
    </folder>
41
    <folder name="Menu">
42
        <folder name="GoTo">
43
            <file name="org-netbeans-modules-groovy-grailsproject-actions-GotoControllerAction.shadow">
44
                <attr name="originalFile" stringvalue="Actions/Groovy/org-netbeans-modules-groovy-grailsproject-actions-GotoControllerAction.instance"/>
45
                <attr name="position" intvalue="550"/>
46
            </file>
47
            <file name="org-netbeans-modules-groovy-grailsproject-actions-GotoViewAction.shadow">
48
                <attr name="originalFile" stringvalue="Actions/Groovy/org-netbeans-modules-groovy-grailsproject-actions-GotoViewAction.instance"/>
49
                <attr name="position" intvalue="575"/>
50
            </file>
51
        </folder>
52
    </folder>
53
    <folder name="Templates">
4
    <folder name="Templates">
54
        <folder name="Project">
5
        <folder name="Project">
55
            <folder name="Groovy">
6
            <folder name="Groovy">
Lines 163-195 Link Here
163
114
164
    <folder name="Editors">
115
    <folder name="Editors">
165
        <folder name="text">
116
        <folder name="text">
166
            <folder name="x-groovy">
167
                <folder name="Popup">
168
                    <folder name="goto">
169
                        <file name="org-netbeans-modules-groovy-grailsproject-actions-GotoViewAction.shadow">
170
                            <attr name="originalFile" stringvalue="Actions/Groovy/org-netbeans-modules-groovy-grailsproject-actions-GotoViewAction.instance"/>
171
                            <attr name="position" intvalue="100"/>
172
                        </file>
173
                        <file name="org-netbeans-modules-groovy-grailsproject-actions-GotoControllerAction.shadow">
174
                            <attr name="originalFile" stringvalue="Actions/Groovy/org-netbeans-modules-groovy-grailsproject-actions-GotoControllerAction.instance"/>
175
                            <attr name="position" intvalue="150"/>
176
                        </file>
177
                    </folder>
178
                </folder>
179
            </folder>
180
            <folder name="x-gsp">
117
            <folder name="x-gsp">
181
                <folder name="Popup">
118
                <folder name="Popup">
182
                    <folder name="goto">
119
                    <folder name="goto">
183
                        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.groovy.grailsproject.Bundle"/>
120
                        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.groovy.grailsproject.Bundle"/>
184
                        <attr name="position" intvalue="100"/>
121
                        <attr name="position" intvalue="100"/>
185
                        <file name="org-netbeans-modules-groovy-grailsproject-actions-GotoViewAction.shadow">
186
                            <attr name="originalFile" stringvalue="Actions/Groovy/org-netbeans-modules-groovy-grailsproject-actions-GotoViewAction.instance"/>
187
                            <attr name="position" intvalue="100"/>
188
                        </file>
189
                        <file name="org-netbeans-modules-groovy-grailsproject-actions-GotoControllerAction.shadow">
190
                            <attr name="originalFile" stringvalue="Actions/Groovy/org-netbeans-modules-groovy-grailsproject-actions-GotoControllerAction.instance"/>
191
                            <attr name="position" intvalue="150"/>
192
                        </file>
193
                    </folder>
122
                    </folder>
194
                </folder>
123
                </folder>
195
            </folder>
124
            </folder>
(-)a/groovy.gsp/src/org/netbeans/modules/groovy/gsp/GspLanguage.java (-1 / +1 lines)
Lines 54-60 Link Here
54
import org.netbeans.modules.parsing.spi.Parser;
54
import org.netbeans.modules.parsing.spi.Parser;
55
55
56
56
57
@LanguageRegistration(mimeType="text/x-gsp", useCustomEditorKit=true, useMultiview=true) //NOI18N
57
@LanguageRegistration(mimeType=GspTokenId.MIME_TYPE, useCustomEditorKit=true, useMultiview=true) //NOI18N
58
public class GspLanguage extends DefaultLanguageConfig {
58
public class GspLanguage extends DefaultLanguageConfig {
59
59
60
    public GspLanguage() {
60
    public GspLanguage() {
(-)a/groovy.gsp/src/org/netbeans/modules/groovy/gsp/loaders/GspDataLoader.java (-1 / +20 lines)
Lines 46-60 Link Here
46
46
47
import java.io.IOException;
47
import java.io.IOException;
48
import org.netbeans.modules.groovy.gsp.lexer.GspTokenId;
48
import org.netbeans.modules.groovy.gsp.lexer.GspTokenId;
49
import static org.netbeans.modules.groovy.gsp.loaders.GspDataLoader.ACTIONS;
50
import org.openide.awt.ActionID;
51
import org.openide.awt.ActionReference;
52
import org.openide.awt.ActionReferences;
49
import org.openide.filesystems.FileObject;
53
import org.openide.filesystems.FileObject;
54
import org.openide.loaders.DataObject.Registration;
50
import org.openide.loaders.DataObjectExistsException;
55
import org.openide.loaders.DataObjectExistsException;
51
import org.openide.loaders.MultiDataObject;
56
import org.openide.loaders.MultiDataObject;
52
import org.openide.loaders.UniFileLoader;
57
import org.openide.loaders.UniFileLoader;
53
import org.openide.util.NbBundle;
58
import org.openide.util.NbBundle;
54
59
60
@Registration(position = 99999, displayName = "org.netbeans.modules.groovy.gsp.resources.Bundle#Loaders/text/x-gsp/Factories/org-netbeans-modules-groovy-gsp-loaders-GspDataLoader.instance", mimeType = GspTokenId.MIME_TYPE,iconBase="org/netbeans/modules/groovy/gsp/resources/GspFile16x16.png")
61
62
@ActionReferences(value = {
63
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.OpenAction"), path = ACTIONS, position = 100),
64
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.FileSystemAction"), path = ACTIONS, position = 200, separatorAfter = 300),
65
    @ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.CutAction"), path = ACTIONS, position = 400),
66
    @ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"), path = ACTIONS, position = 500, separatorAfter = 600),
67
    @ActionReference(id = @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"), path = ACTIONS, position = 700),
68
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.RenameAction"), path = ACTIONS, position = 800, separatorAfter = 900),
69
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"), path = ACTIONS, position = 1000, separatorAfter = 1100),
70
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = ACTIONS, position = 1200),
71
    @ActionReference(id = @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = ACTIONS, position = 1300)})
72
55
public class GspDataLoader extends UniFileLoader {
73
public class GspDataLoader extends UniFileLoader {
56
    
74
    
57
    private static final long serialVersionUID = 1L;
75
    private static final long serialVersionUID = 1L;
76
    protected static final String ACTIONS = "Loaders/"+GspTokenId.MIME_TYPE+"/Actions";
58
    
77
    
59
    public GspDataLoader() {
78
    public GspDataLoader() {
60
        super("org.netbeans.modules.groovy.gsp.loaders.GspDataObject");
79
        super("org.netbeans.modules.groovy.gsp.loaders.GspDataObject");
Lines 77-83 Link Here
77
    
96
    
78
    @Override
97
    @Override
79
    protected String actionsContext() {
98
    protected String actionsContext() {
80
        return "Loaders/" + GspTokenId.MIME_TYPE + "/Actions";
99
        return ACTIONS;
81
    }
100
    }
82
    
101
    
83
}
102
}
(-)a/groovy.gsp/src/org/netbeans/modules/groovy/gsp/loaders/GspDataObject.java (-3 / +4 lines)
Lines 47-52 Link Here
47
import java.io.IOException;
47
import java.io.IOException;
48
import org.netbeans.core.spi.multiview.MultiViewElement;
48
import org.netbeans.core.spi.multiview.MultiViewElement;
49
import org.netbeans.core.spi.multiview.text.MultiViewEditorElement;
49
import org.netbeans.core.spi.multiview.text.MultiViewEditorElement;
50
import org.netbeans.modules.groovy.gsp.lexer.GspTokenId;
50
import org.openide.filesystems.FileObject;
51
import org.openide.filesystems.FileObject;
51
import org.openide.filesystems.MIMEResolver;
52
import org.openide.filesystems.MIMEResolver;
52
import org.openide.loaders.DataObjectExistsException;
53
import org.openide.loaders.DataObjectExistsException;
Lines 58-64 Link Here
58
@MIMEResolver.ExtensionRegistration(
59
@MIMEResolver.ExtensionRegistration(
59
    displayName="#GspResolver",
60
    displayName="#GspResolver",
60
    extension="gsp",
61
    extension="gsp",
61
    mimeType="text/x-gsp",
62
    mimeType=GspTokenId.MIME_TYPE,
62
    position=255
63
    position=255
63
)
64
)
64
public class GspDataObject extends MultiDataObject
65
public class GspDataObject extends MultiDataObject
Lines 66-72 Link Here
66
    
67
    
67
    public GspDataObject(FileObject pf, GspDataLoader loader) throws DataObjectExistsException, IOException {
68
    public GspDataObject(FileObject pf, GspDataLoader loader) throws DataObjectExistsException, IOException {
68
        super(pf, loader);
69
        super(pf, loader);
69
        registerEditor("text/x-gsp", true);
70
        registerEditor(GspTokenId.MIME_TYPE, true);
70
    }
71
    }
71
    
72
    
72
    @Override
73
    @Override
Lines 82-88 Link Here
82
    @MultiViewElement.Registration(
83
    @MultiViewElement.Registration(
83
        displayName = "#CTL_SourceTabCaption",
84
        displayName = "#CTL_SourceTabCaption",
84
        iconBase = "org/netbeans/modules/groovy/gsp/resources/GspFile16x16.png",
85
        iconBase = "org/netbeans/modules/groovy/gsp/resources/GspFile16x16.png",
85
        mimeType = "text/x-gsp",
86
        mimeType = GspTokenId.MIME_TYPE,
86
        persistenceType = TopComponent.PERSISTENCE_ONLY_OPENED,
87
        persistenceType = TopComponent.PERSISTENCE_ONLY_OPENED,
87
        preferredID = "groovy.gsp",
88
        preferredID = "groovy.gsp",
88
        position = 1
89
        position = 1
(-)a/groovy.gsp/src/org/netbeans/modules/groovy/gsp/resources/layer.xml (-61 / +2 lines)
Lines 1-74 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
2
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
3
<filesystem>
3
<filesystem>
4
 
4
    <folder name="Loaders">
5
    <folder name="Loaders">
5
        <folder name="text">
6
        <folder name="text">
6
            <folder name="x-gsp">
7
            <folder name="x-gsp">
7
                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/groovy/gsp/resources/GspFile16x16.png"/>
8
                <attr name="iconBase" stringvalue="org/netbeans/modules/groovy/gsp/resources/GspFile16x16.png"/>
8
                <attr name="iconBase" stringvalue="org/netbeans/modules/groovy/gsp/resources/GspFile16x16.png"/>
9
                <folder name="Factories">
10
                    <file name="org-netbeans-modules-groovy-gsp-loaders-GspDataLoader.instance">
11
                        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.groovy.gsp.resources.Bundle"/>
12
                        <attr name="position" intvalue="99999"/>
13
                    </file>
14
                </folder>
15
                <folder name="Actions">
16
                    <file name="org-openide-actions-CopyAction.shadow">
17
                        <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CopyAction.instance"/>
18
                        <attr name="position" intvalue="500"/>
19
                    </file>
20
                    <file name="org-openide-actions-CutAction.shadow">
21
                        <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-CutAction.instance"/>
22
                        <attr name="position" intvalue="400"/>
23
                    </file>
24
                    <file name="org-openide-actions-DeleteAction.shadow">
25
                        <attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-DeleteAction.instance"/>
26
                        <attr name="position" intvalue="700"/>
27
                    </file>
28
                    <file name="org-openide-actions-FileSystemAction.shadow">
29
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-FileSystemAction.instance"/>
30
                        <attr name="position" intvalue="200"/>
31
                    </file>
32
                    <file name="org-openide-actions-OpenAction.shadow">
33
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-OpenAction.instance"/>
34
                        <attr name="position" intvalue="100"/>
35
                    </file>
36
                    <file name="org-openide-actions-PropertiesAction.shadow">
37
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-PropertiesAction.instance"/>
38
                        <attr name="position" intvalue="1300"/>
39
                    </file>
40
                    <file name="org-openide-actions-RenameAction.shadow">
41
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-RenameAction.instance"/>
42
                        <attr name="position" intvalue="800"/>
43
                    </file>
44
                    <file name="org-openide-actions-SaveAsTemplateAction.shadow">
45
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAsTemplateAction.instance"/>
46
                        <attr name="position" intvalue="1000"/>
47
                    </file>
48
                    <file name="org-openide-actions-ToolsAction.shadow">
49
                        <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-ToolsAction.instance"/>
50
                        <attr name="position" intvalue="1200"/>
51
                    </file>
52
                    <file name="sep-1.instance">
53
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
54
                        <attr name="position" intvalue="300"/>
55
                    </file>
56
                    <file name="sep-2.instance">
57
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
58
                        <attr name="position" intvalue="600"/>
59
                    </file>
60
                    <file name="sep-3.instance">
61
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
62
                        <attr name="position" intvalue="900"/>
63
                    </file>
64
                    <file name="sep-4.instance">
65
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
66
                        <attr name="position" intvalue="1100"/>
67
                    </file>
68
                    </folder>
69
            </folder>
9
            </folder>
70
        </folder>
10
        </folder>
71
    </folder>
11
    </folder>
12
    
72
    <folder name="Templates">
13
    <folder name="Templates">
73
        <folder name="Groovy">
14
        <folder name="Groovy">
74
            <file name="_view.gsp" url="GspTemplate.gsp">
15
            <file name="_view.gsp" url="GspTemplate.gsp">
(-)a/groovy.support/src/org/netbeans/modules/groovy/support/Bundle.properties (-88 / +87 lines)
Lines 1-88 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
2
#
3
# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
3
# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
4
#
4
#
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
5
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6
# Other names may be trademarks of their respective owners.
6
# Other names may be trademarks of their respective owners.
7
#
7
#
8
# The contents of this file are subject to the terms of either the GNU
8
# The contents of this file are subject to the terms of either the GNU
9
# General Public License Version 2 only ("GPL") or the Common
9
# General Public License Version 2 only ("GPL") or the Common
10
# Development and Distribution License("CDDL") (collectively, the
10
# Development and Distribution License("CDDL") (collectively, the
11
# "License"). You may not use this file except in compliance with the
11
# "License"). You may not use this file except in compliance with the
12
# License. You can obtain a copy of the License at
12
# License. You can obtain a copy of the License at
13
# http://www.netbeans.org/cddl-gplv2.html
13
# http://www.netbeans.org/cddl-gplv2.html
14
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
14
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
# specific language governing permissions and limitations under the
15
# specific language governing permissions and limitations under the
16
# License.  When distributing the software, include this License Header
16
# License.  When distributing the software, include this License Header
17
# Notice in each file and include the License file at
17
# Notice in each file and include the License file at
18
# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
18
# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
19
# particular file as subject to the "Classpath" exception as provided
19
# particular file as subject to the "Classpath" exception as provided
20
# by Oracle in the GPL Version 2 section of the License file that
20
# by Oracle in the GPL Version 2 section of the License file that
21
# accompanied this code. If applicable, add the following below the
21
# accompanied this code. If applicable, add the following below the
22
# License Header, with the fields enclosed by brackets [] replaced by
22
# License Header, with the fields enclosed by brackets [] replaced by
23
# your own identifying information:
23
# your own identifying information:
24
# "Portions Copyrighted [year] [name of copyright owner]"
24
# "Portions Copyrighted [year] [name of copyright owner]"
25
#
25
#
26
# Contributor(s):
26
# Contributor(s):
27
#
27
#
28
# The Original Software is NetBeans. The Initial Developer of the Original
28
# The Original Software is NetBeans. The Initial Developer of the Original
29
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
29
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
# Microsystems, Inc. All Rights Reserved.
30
# Microsystems, Inc. All Rights Reserved.
31
#
31
#
32
# If you wish your version of this file to be governed by only the CDDL
32
# If you wish your version of this file to be governed by only the CDDL
33
# or only the GPL Version 2, indicate your decision by adding
33
# or only the GPL Version 2, indicate your decision by adding
34
# "[Contributor] elects to include this software in this distribution
34
# "[Contributor] elects to include this software in this distribution
35
# under the [CDDL or GPL Version 2] license." If you do not indicate a
35
# under the [CDDL or GPL Version 2] license." If you do not indicate a
36
# single choice of license, a recipient has the option to distribute
36
# single choice of license, a recipient has the option to distribute
37
# your version of this file under either the CDDL, the GPL Version 2 or
37
# your version of this file under either the CDDL, the GPL Version 2 or
38
# to extend the choice of license to its licensees as provided above.
38
# to extend the choice of license to its licensees as provided above.
39
# However, if you add GPL Version 2 code and therefore, elected the GPL
39
# However, if you add GPL Version 2 code and therefore, elected the GPL
40
# Version 2 license, then the option applies only if the new code is
40
# Version 2 license, then the option applies only if the new code is
41
# made subject to such option by the copyright holder.
41
# made subject to such option by the copyright holder.
42
42
43
LBL_GroovySetting=Groovy
43
LBL_GroovySetting=Groovy
44
44
45
PROP_GroovyHome=Groovy Home
45
PROP_GroovyHome=Groovy Home
46
HINT_GroovyHome=Groovy installation directory.
46
HINT_GroovyHome=Groovy installation directory.
47
47
48
LBL_loaderName=Groovy Objects
48
LBL_loaderName=Groovy Objects
49
49
50
MSG_HomeNotSet=Groovy home is not set.\n\
50
MSG_HomeNotSet=Groovy home is not set.\n\
51
Go to Tools -> Options -> Advanced Options -> Building -> Groovy and specify where Groovy is installed.
51
Go to Tools -> Options -> Advanced Options -> Building -> Groovy and specify where Groovy is installed.
52
52
53
MSG_HomeNotSetTemplate=Groovy home is not set.\n\
53
MSG_HomeNotSetTemplate=Groovy home is not set.\n\
54
After finishing the "Create new..." wizard, go to Tools -> Options -> Building -> Groovy\n\
54
After finishing the "Create new..." wizard, go to Tools -> Options -> Building -> Groovy\n\
55
and specify where Groovy is installed.\n\
55
and specify where Groovy is installed.\n\
56
Then run Tools -> Make WebApp Groovy Compliant action to correct your web application.
56
Then run Tools -> Make WebApp Groovy Compliant action to correct your web application.
57
57
58
# manifest.mf
58
# manifest.mf
59
OpenIDE-Module-Name=Coyote - Groovy Support
59
OpenIDE-Module-Name=Coyote - Groovy Support
60
OpenIDE-Module-Display-Category=Tools
60
OpenIDE-Module-Display-Category=Tools
61
OpenIDE-Module-Short-Description=Enables editing and running of scripts written in Groovy language.
61
OpenIDE-Module-Short-Description=Enables editing and running of scripts written in Groovy language.
62
OpenIDE-Module-Long-Description=The Groovy Support module enables editing and running of \
62
OpenIDE-Module-Long-Description=The Groovy Support module enables editing and running of \
63
user application files written in Groovy language. This module requires groovy installation \
63
user application files written in Groovy language. This module requires groovy installation \
64
on the computer. Groovy home page: http://groovy.codehaus.org/
64
on the computer. Groovy home page: http://groovy.codehaus.org/
65
65
66
#MakeGroovyWebApp
66
#MakeGroovyWebApp
67
CTL_MakeGroovyWebAppAction=Make WebApp Groovy Compliant
67
CTL_MakeGroovyWebAppAction=Make WebApp Groovy Compliant
68
EXC_UnsupportedVersion=Unsupported web.xml version: {0}
68
EXC_UnsupportedVersion=Unsupported web.xml version: {0}
69
MSG_ConfirmUpdateWebXML=Do you want to make {0} web application Groovy compliant?\n\
69
MSG_ConfirmUpdateWebXML=Do you want to make {0} web application Groovy compliant?\n\
70
Several elements will be added WEB-INF/web.xml deployment descriptor\n\
70
Several elements will be added WEB-INF/web.xml deployment descriptor\n\
71
and a few required libraries will be added to the project.
71
and a few required libraries will be added to the project.
72
72
73
TIT_ConfirmUpdateWebXML=Confirm web.xml update
73
TIT_ConfirmUpdateWebXML=Confirm web.xml update
74
74
75
# Messages for the IDE's status line
75
# Messages for the IDE's status line
76
MSG_ScriptStarted=Script {0} started.
76
MSG_ScriptStarted=Script {0} started.
77
MSG_ScriptFinished=Script {0} finished.
77
MSG_ScriptFinished=Script {0} finished.
78
MSG_ScriptFailed=Script {0} failed.
78
MSG_ScriptFailed=Script {0} failed.
79
79
80
EXC_LibraryNotFound=Cannot find {0} library in {1}.
80
EXC_LibraryNotFound=Cannot find {0} library in {1}.
81
81
82
LBL_No_Build_XML_Found=The project does not have a build script.
82
LBL_No_Build_XML_Found=The project does not have a build script.
83
LBL_RunFile_Action=Run File
83
LBL_CompileFile_Action=Compile File
84
LBL_CompileFile_Action=Compile File
84
ACTION_run.single=Run File
85
ACTION_run.single=Run File
85
ACTION_debug.single=Debug File
86
ACTION_debug.single=Debug File
86
87
87
LBL_No_Main_Classs_Found=Class "{0}" does not have a main method.
88
LBL_No_Main_Classs_Found=Class "{0}" does not have a main method.
(-)a/groovy.support/src/org/netbeans/modules/groovy/support/GroovyProjectModule.java (-4 / +10 lines)
Lines 44-53 Link Here
44
44
45
package org.netbeans.modules.groovy.support;
45
package org.netbeans.modules.groovy.support;
46
import javax.swing.Action;
46
import javax.swing.Action;
47
import static org.netbeans.modules.groovy.support.Bundle.LBL_RunFile_Action;
47
import org.netbeans.spi.project.ActionProvider;
48
import org.netbeans.spi.project.ActionProvider;
48
import org.netbeans.spi.project.ui.support.FileSensitiveActions;
49
import org.netbeans.spi.project.ui.support.FileSensitiveActions;
49
import org.openide.util.NbBundle;
50
import org.openide.awt.ActionID;
50
51
import org.openide.awt.ActionReference;
52
import org.openide.awt.ActionRegistration;
53
import org.openide.util.NbBundle.Messages;
51
54
52
/**
55
/**
53
 * Supplies project-specific file actions (e.g. compile/run) for *.groovy files.
56
 * Supplies project-specific file actions (e.g. compile/run) for *.groovy files.
Lines 55-65 Link Here
55
 * @author Petr Hejl
58
 * @author Petr Hejl
56
 */
59
 */
57
public class GroovyProjectModule {
60
public class GroovyProjectModule {
58
61
    @Messages("LBL_RunFile_Action=Run File")
62
    @ActionID(id = "org.netbeans.modules.groovy.support.GroovyProjectModule", category = "Groovy")
63
    @ActionRegistration(lazy = false, displayName = "#LBL_RunFile_Action")
64
    @ActionReference(path = "Loaders/text/x-groovy/Actions", position = 550, separatorBefore = 530)
59
    public static Action run() {
65
    public static Action run() {
60
        return FileSensitiveActions.fileCommandAction(
66
        return FileSensitiveActions.fileCommandAction(
61
                ActionProvider.COMMAND_RUN_SINGLE,
67
                ActionProvider.COMMAND_RUN_SINGLE,
62
                NbBundle.getMessage(GroovyProjectModule.class, "LBL_RunFile_Action"), // NOI18N
68
                LBL_RunFile_Action(), // NOI18N
63
                null);
69
                null);
64
    }
70
    }
65
71
(-)a/groovy.support/src/org/netbeans/modules/groovy/support/resources/layer.xml (-19 / +1 lines)
Lines 50-72 Link Here
50
                </folder>
50
                </folder>
51
            </folder>
51
            </folder>
52
        </folder>
52
        </folder>
53
    </folder>
53
    </folder>  
54
55
    <folder name="Loaders">
56
        <folder name="text">
57
            <folder name="x-groovy">
58
                <folder name="Actions">
59
                    <file name="groovy-project-separator-1.instance">
60
                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
61
                        <attr name="position" intvalue="530"/>
62
                    </file>
63
                    <file name="RunFile.instance">
64
                        <attr name="instanceCreate" methodvalue="org.netbeans.modules.groovy.support.GroovyProjectModule.run"/>
65
                        <attr name="position" intvalue="550"/>
66
                        <attr name="misplaced.action.allowed" boolvalue="true"/>
67
                    </file>
68
                </folder>
69
            </folder>
70
        </folder>
71
    </folder>
72
</filesystem>
54
</filesystem>

Return to bug 210382