Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 153655 | Differences between
and this patch

Collapse All | Expand All

(-)ant.freeform/nbproject/project.xml (-1 / +1 lines)
 Lines 61-67    Link Here 
61
                    <compile-dependency/>
61
                    <compile-dependency/>
62
                    <run-dependency>
62
                    <run-dependency>
63
                        <release-version>1</release-version>
63
                        <release-version>1</release-version>
64
                        <specification-version>1.15</specification-version>
64
                        <specification-version>1.30</specification-version>
65
                    </run-dependency>
65
                    </run-dependency>
66
                </dependency>
66
                </dependency>
67
                <dependency>
67
                <dependency>
(-)ant.freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java (-1 / +10 lines)
 Lines 56-61    Link Here 
56
import org.netbeans.modules.ant.freeform.ui.View;
56
import org.netbeans.modules.ant.freeform.ui.View;
57
import org.netbeans.spi.project.AuxiliaryConfiguration;
57
import org.netbeans.spi.project.AuxiliaryConfiguration;
58
import org.netbeans.spi.project.support.LookupProviderSupport;
58
import org.netbeans.spi.project.support.LookupProviderSupport;
59
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
59
import org.netbeans.spi.project.support.ant.AntProjectHelper;
60
import org.netbeans.spi.project.support.ant.AntProjectHelper;
60
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
61
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
61
import org.netbeans.spi.project.support.ant.PropertyUtils;
62
import org.netbeans.spi.project.support.ant.PropertyUtils;
 Lines 64-70    Link Here 
64
import org.openide.util.ImageUtilities;
65
import org.openide.util.ImageUtilities;
65
import org.openide.util.Lookup;
66
import org.openide.util.Lookup;
66
import org.openide.util.Mutex;
67
import org.openide.util.Mutex;
67
import org.openide.util.Utilities;
68
import org.openide.util.lookup.Lookups;
68
import org.openide.util.lookup.Lookups;
69
import org.w3c.dom.Element;
69
import org.w3c.dom.Element;
70
import org.w3c.dom.NodeList;
70
import org.w3c.dom.NodeList;
 Lines 73-78    Link Here 
73
 * One freeform project.
73
 * One freeform project.
74
 * @author Jesse Glick
74
 * @author Jesse Glick
75
 */
75
 */
76
@AntBasedProjectRegistration(
77
    type=FreeformProjectType.TYPE,
78
    iconResource="org/netbeans/modules/ant/freeform/resources/freeform-project.png",
79
    sharedName=FreeformProjectType.NAME_SHARED,
80
    privateName=FreeformProjectType.NAME_SHARED,
81
    sharedNamespace=FreeformProjectType.NS_GENERAL_1,
82
    privateNamespace=FreeformProjectType.NS_GENERAL_PRIVATE
83
)
76
public final class FreeformProject implements Project {
84
public final class FreeformProject implements Project {
77
    
85
    
78
    public static final Lookup.Result<ProjectNature> PROJECT_NATURES = Lookup.getDefault().lookupResult(ProjectNature.class);
86
    public static final Lookup.Result<ProjectNature> PROJECT_NATURES = Lookup.getDefault().lookupResult(ProjectNature.class);
 Lines 146-151    Link Here 
146
        return eval;
154
        return eval;
147
    }
155
    }
148
156
157
    @Override
149
    public String toString() {
158
    public String toString() {
150
        return "FreeformProject[" + getProjectDirectory() + "]"; // NOI18N
159
        return "FreeformProject[" + getProjectDirectory() + "]"; // NOI18N
151
    }
160
    }
(-)ant.freeform/src/org/netbeans/modules/ant/freeform/FreeformProjectType.java (-30 / +2 lines)
 Lines 41-82    Link Here 
41
41
42
package org.netbeans.modules.ant.freeform;
42
package org.netbeans.modules.ant.freeform;
43
43
44
import java.io.IOException;
45
import org.netbeans.api.project.Project;
46
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
47
import org.netbeans.spi.project.support.ant.AntProjectHelper;
48
49
/**
44
/**
50
 * Freeform project type.
45
 * Freeform project type.
51
 * @author Jesse Glick
46
 * @author Jesse Glick
52
 */
47
 */
53
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
48
public final class FreeformProjectType {
54
public final class FreeformProjectType implements AntBasedProjectType {
55
56
    public static final String TYPE = "org.netbeans.modules.ant.freeform";
49
    public static final String TYPE = "org.netbeans.modules.ant.freeform";
57
    public static final String NS_GENERAL_1 = "http://www.netbeans.org/ns/freeform-project/1"; // NOI18N
50
    public static final String NS_GENERAL_1 = "http://www.netbeans.org/ns/freeform-project/1"; // NOI18N
58
    public static final String NS_GENERAL = org.netbeans.modules.ant.freeform.spi.support.Util.NAMESPACE;
51
    public static final String NS_GENERAL = org.netbeans.modules.ant.freeform.spi.support.Util.NAMESPACE;
59
    public static final String NAME_SHARED = "general-data"; // NOI18N
52
    public static final String NAME_SHARED = "general-data"; // NOI18N
60
    private static final String NS_GENERAL_PRIVATE = "http://www.netbeans.org/ns/freeform-project-private/1"; // NOI18N
53
    static final String NS_GENERAL_PRIVATE = "http://www.netbeans.org/ns/freeform-project-private/1"; // NOI18N
61
    
62
    /** Default constructor for lookup. */
63
    public FreeformProjectType() {}
64
    
65
    public Project createProject(AntProjectHelper helper) throws IOException {
66
        return new FreeformProject(helper);
67
    }
68
    
69
    public String getPrimaryConfigurationDataElementName(boolean shared) {
70
        return NAME_SHARED;
71
    }
72
    
73
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
74
        // No private.xml defined anyway.
75
        return shared ? /* old! for FreeformProjectGenerator */ NS_GENERAL_1 : NS_GENERAL_PRIVATE;
76
    }
77
    
78
    public String getType() {
79
        return TYPE; // NOI18N
80
    }
81
    
82
}
54
}
(-)apisupport.project/nbproject/project.xml (-1 / +1 lines)
 Lines 196-202    Link Here 
196
                    <compile-dependency/>
196
                    <compile-dependency/>
197
                    <run-dependency>
197
                    <run-dependency>
198
                        <release-version>1</release-version>
198
                        <release-version>1</release-version>
199
                        <specification-version>1.28</specification-version>
199
                        <specification-version>1.30</specification-version>
200
                    </run-dependency>
200
                    </run-dependency>
201
                </dependency>
201
                </dependency>
202
                <dependency>
202
                <dependency>
(-)apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProject.java (-1 / +10 lines)
 Lines 112-117    Link Here 
112
import org.netbeans.modules.apisupport.project.universe.LocalizedBundleInfo;
112
import org.netbeans.modules.apisupport.project.universe.LocalizedBundleInfo;
113
import org.netbeans.modules.apisupport.project.universe.ModuleEntry;
113
import org.netbeans.modules.apisupport.project.universe.ModuleEntry;
114
import org.netbeans.spi.project.support.LookupProviderSupport;
114
import org.netbeans.spi.project.support.LookupProviderSupport;
115
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
115
import org.netbeans.spi.project.ui.RecommendedTemplates;
116
import org.netbeans.spi.project.ui.RecommendedTemplates;
116
import org.netbeans.spi.project.ui.support.UILookupMergerSupport;
117
import org.netbeans.spi.project.ui.support.UILookupMergerSupport;
117
import org.openide.modules.SpecificationVersion;
118
import org.openide.modules.SpecificationVersion;
 Lines 121-126    Link Here 
121
 * A NetBeans module project.
122
 * A NetBeans module project.
122
 * @author Jesse Glick
123
 * @author Jesse Glick
123
 */
124
 */
125
@AntBasedProjectRegistration(
126
    type=NbModuleProjectType.TYPE,
127
    iconResource="org/netbeans/modules/apisupport/project/resources/module.png", // NOI18N
128
    sharedName=NbModuleProjectType.NAME_SHARED,
129
    sharedNamespace= NbModuleProjectType.NAMESPACE_SHARED,
130
    privateName=NbModuleProjectType.NAME_PRIVATE,
131
    privateNamespace= NbModuleProjectType.NAMESPACE_PRIVATE
132
)
124
public final class NbModuleProject implements Project {
133
public final class NbModuleProject implements Project {
125
    
134
    
126
    public static final String NB_PROJECT_ICON_PATH =
135
    public static final String NB_PROJECT_ICON_PATH =
 Lines 139-145    Link Here 
139
    private final GeneratedFilesHelper genFilesHelper;
148
    private final GeneratedFilesHelper genFilesHelper;
140
    private final NbModuleProviderImpl typeProvider;
149
    private final NbModuleProviderImpl typeProvider;
141
    
150
    
142
    NbModuleProject(AntProjectHelper helper) throws IOException {
151
    public NbModuleProject(AntProjectHelper helper) throws IOException {
143
        AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
152
        AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
144
        for (int v = 4; v < 10; v++) {
153
        for (int v = 4; v < 10; v++) {
145
            if (aux.getConfigurationFragment("data", "http://www.netbeans.org/ns/nb-module-project/" + v, true) != null) { // NOI18N
154
            if (aux.getConfigurationFragment("data", "http://www.netbeans.org/ns/nb-module-project/" + v, true) != null) { // NOI18N
(-)apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProjectType.java (-35 / +5 lines)
 Lines 41-88    Link Here 
41
41
42
package org.netbeans.modules.apisupport.project;
42
package org.netbeans.modules.apisupport.project;
43
43
44
import java.io.IOException;
45
import javax.swing.Icon;
46
import org.netbeans.api.project.Project;
47
import org.netbeans.spi.project.support.ant.AntBasedProjectType2;
48
import org.netbeans.spi.project.support.ant.AntProjectHelper;
49
import org.openide.util.ImageUtilities;
50
51
/**
44
/**
52
 * Factory for NetBeans module projects.
45
 * Constants.
53
 * @author Jesse Glick
46
 * @author Jesse Glick
54
 */
47
 */
55
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
48
public final class NbModuleProjectType {
56
public final class NbModuleProjectType implements AntBasedProjectType2 {
57
49
58
    static final String TYPE = "org.netbeans.modules.apisupport.project"; // NOI18N
50
    static final String TYPE = "org.netbeans.modules.apisupport.project"; // NOI18N
59
    static final String NAME_SHARED = "data"; // NOI18N
51
    static final String NAME_SHARED = "data"; // NOI18N
60
    public static final String NAMESPACE_SHARED = "http://www.netbeans.org/ns/nb-module-project/3"; // NOI18N
52
    public static final String NAMESPACE_SHARED = "http://www.netbeans.org/ns/nb-module-project/3"; // NOI18N
61
    public static final String NAMESPACE_SHARED_2 = "http://www.netbeans.org/ns/nb-module-project/2"; // NOI18N
53
    public static final String NAMESPACE_SHARED_2 = "http://www.netbeans.org/ns/nb-module-project/2"; // NOI18N
62
    private static final String NAME_PRIVATE = "data"; // NOI18N
54
    static final String NAME_PRIVATE = "data"; // NOI18N
63
    private static final String NAMESPACE_PRIVATE = "http://www.netbeans.org/ns/nb-module-project-private/1"; // NOI18N
55
    static final String NAMESPACE_PRIVATE = "http://www.netbeans.org/ns/nb-module-project-private/1"; // NOI18N
64
    
56
    
65
    /** Default constructor for lookup. */
57
    private NbModuleProjectType() {}
66
    public NbModuleProjectType() {}
67
    
68
    public String getType() {
69
        return TYPE;
70
    }
71
    
72
    public Project createProject(AntProjectHelper helper) throws IOException {
73
        return new NbModuleProject(helper);
74
    }
75
    
76
    public String getPrimaryConfigurationDataElementName(boolean shared) {
77
        return shared ? NAME_SHARED : NAME_PRIVATE;
78
    }
79
    
80
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
81
        return shared ? NAMESPACE_SHARED : NAMESPACE_PRIVATE;
82
    }
83
84
    public Icon getIcon() {
85
        return ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/apisupport/project/resources/module.png", true));
86
    }
87
    
88
}
58
}
(-)apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProject.java (+9 lines)
 Lines 67-72    Link Here 
67
import org.netbeans.modules.apisupport.project.ui.customizer.SuiteProperties;
67
import org.netbeans.modules.apisupport.project.ui.customizer.SuiteProperties;
68
import org.netbeans.modules.apisupport.project.universe.NbPlatform;
68
import org.netbeans.modules.apisupport.project.universe.NbPlatform;
69
import org.netbeans.spi.project.support.LookupProviderSupport;
69
import org.netbeans.spi.project.support.LookupProviderSupport;
70
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
70
import org.netbeans.spi.project.support.ant.AntProjectEvent;
71
import org.netbeans.spi.project.support.ant.AntProjectEvent;
71
import org.netbeans.spi.project.support.ant.AntProjectHelper;
72
import org.netbeans.spi.project.support.ant.AntProjectHelper;
72
import org.netbeans.spi.project.support.ant.AntProjectListener;
73
import org.netbeans.spi.project.support.ant.AntProjectListener;
 Lines 93-98    Link Here 
93
 * Represents one module suite project.
94
 * Represents one module suite project.
94
 * @author Jesse Glick
95
 * @author Jesse Glick
95
 */
96
 */
97
@AntBasedProjectRegistration(
98
    type=SuiteProjectType.TYPE,
99
    iconResource="org/netbeans/modules/apisupport/project/suite/resources/suite.png", // NOI18N
100
    sharedName=SuiteProjectType.NAME_SHARED,
101
    sharedNamespace= SuiteProjectType.NAMESPACE_SHARED,
102
    privateName=SuiteProjectType.NAME_PRIVATE,
103
    privateNamespace= SuiteProjectType.NAMESPACE_PRIVATE
104
)
96
public final class SuiteProject implements Project {
105
public final class SuiteProject implements Project {
97
    
106
    
98
    public static final String SUITE_ICON_PATH =
107
    public static final String SUITE_ICON_PATH =
(-)apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProjectType.java (-33 / +4 lines)
 Lines 41-87    Link Here 
41
41
42
package org.netbeans.modules.apisupport.project.suite;
42
package org.netbeans.modules.apisupport.project.suite;
43
43
44
import java.io.IOException;
45
import javax.swing.Icon;
46
import org.netbeans.api.project.Project;
47
import org.netbeans.spi.project.support.ant.AntBasedProjectType2;
48
import org.netbeans.spi.project.support.ant.AntProjectHelper;
49
import org.openide.util.ImageUtilities;
50
51
/**
44
/**
52
 * Factory for NetBeans module suite projects.
45
 * Factory for NetBeans module suite projects.
53
 * @author Jesse Glick
46
 * @author Jesse Glick
54
 */
47
 */
55
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
48
public final class SuiteProjectType {
56
public final class SuiteProjectType implements AntBasedProjectType2 {
57
49
58
    public static final String TYPE = "org.netbeans.modules.apisupport.project.suite"; // NOI18N
50
    public static final String TYPE = "org.netbeans.modules.apisupport.project.suite"; // NOI18N
59
    static final String NAME_SHARED = "data"; // NOI18N
51
    static final String NAME_SHARED = "data"; // NOI18N
60
    public static final String NAMESPACE_SHARED = "http://www.netbeans.org/ns/nb-module-suite-project/1"; // NOI18N
52
    public static final String NAMESPACE_SHARED = "http://www.netbeans.org/ns/nb-module-suite-project/1"; // NOI18N
61
    private static final String NAME_PRIVATE = "data"; // NOI18N
53
    static final String NAME_PRIVATE = "data"; // NOI18N
62
    private static final String NAMESPACE_PRIVATE = "http://www.netbeans.org/ns/nb-module-suite-project-private/1"; // NOI18N
54
    static final String NAMESPACE_PRIVATE = "http://www.netbeans.org/ns/nb-module-suite-project-private/1"; // NOI18N
63
    
55
    
64
    /** Default constructor for lookup. */
56
    /** Default constructor for lookup. */
65
    public SuiteProjectType() {}
57
    private SuiteProjectType() {}
66
    
67
    public String getType() {
68
        return TYPE;
69
    }
70
    
71
    public Project createProject(AntProjectHelper helper) throws IOException {
72
        return new SuiteProject(helper);
73
    }
74
    
75
    public String getPrimaryConfigurationDataElementName(boolean shared) {
76
        return shared ? NAME_SHARED : NAME_PRIVATE;
77
    }
78
    
79
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
80
        return shared ? NAMESPACE_SHARED : NAMESPACE_PRIVATE;
81
    }
82
83
    public Icon getIcon() {
84
        return ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/apisupport/project/suite/resources/suite.png", true));
85
    }
86
    
87
}
58
}
(-)bpel.project/nbproject/project.xml (-1 / +1 lines)
 Lines 156-162    Link Here 
156
                    <compile-dependency/>
156
                    <compile-dependency/>
157
                    <run-dependency>
157
                    <run-dependency>
158
                        <release-version>1</release-version>
158
                        <release-version>1</release-version>
159
                        <specification-version>1.12.1</specification-version>
159
                        <specification-version>1.30</specification-version>
160
                    </run-dependency>
160
                    </run-dependency>
161
                </dependency>
161
                </dependency>
162
                <dependency>
162
                <dependency>
(-)bpel.project/src/org/netbeans/modules/bpel/project/BpelproProject.java (+7 lines)
 Lines 87-92    Link Here 
87
import org.netbeans.modules.xml.retriever.catalog.CatalogWriteModel;
87
import org.netbeans.modules.xml.retriever.catalog.CatalogWriteModel;
88
import org.netbeans.modules.xml.retriever.catalog.CatalogWriteModelFactory;
88
import org.netbeans.modules.xml.retriever.catalog.CatalogWriteModelFactory;
89
import org.netbeans.modules.xml.xam.locator.CatalogModelException;
89
import org.netbeans.modules.xml.xam.locator.CatalogModelException;
90
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
90
import org.netbeans.spi.project.support.ant.PropertyUtils;
91
import org.netbeans.spi.project.support.ant.PropertyUtils;
91
import org.w3c.dom.Element;
92
import org.w3c.dom.Element;
92
import org.w3c.dom.Node;
93
import org.w3c.dom.Node;
 Lines 96-101    Link Here 
96
/**
97
/**
97
 * @author Chris Webster
98
 * @author Chris Webster
98
 */
99
 */
100
@AntBasedProjectRegistration(
101
    type=BpelproProjectType.TYPE,
102
    iconResource="org/netbeans/modules/bpel/project/resources/bpelProject.png",
103
    sharedNamespace=BpelproProjectType.PROJECT_CONFIGURATION_NAMESPACE,
104
    privateNamespace=BpelproProjectType.PRIVATE_CONFIGURATION_NAMESPACE
105
)
99
public final class BpelproProject implements Project, AntProjectListener, ProjectPropertyProvider {
106
public final class BpelproProject implements Project, AntProjectListener, ProjectPropertyProvider {
100
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/bpel/project/resources/bpelProject.png")); // NOI18N
107
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/bpel/project/resources/bpelProject.png")); // NOI18N
101
108
(-)bpel.project/src/org/netbeans/modules/bpel/project/BpelproProjectType.java (-29 / +1 lines)
 Lines 18-59    Link Here 
18
 */
18
 */
19
package org.netbeans.modules.bpel.project;
19
package org.netbeans.modules.bpel.project;
20
20
21
import java.io.IOException;
22
import org.netbeans.api.project.Project;
23
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
24
import org.netbeans.spi.project.support.ant.AntProjectHelper;
25
26
/**
21
/**
27
 * Factory for EJB Module projects
22
 * Factory for EJB Module projects
28
 * @author Chris Webster
23
 * @author Chris Webster
29
 */
24
 */
30
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
25
public class BpelproProjectType {
31
public class BpelproProjectType implements AntBasedProjectType {
32
    public static final String TYPE = "org.netbeans.modules.bpel.project";
26
    public static final String TYPE = "org.netbeans.modules.bpel.project";
33
    public static final String PROJECT_CONFIGURATION_NAME = "data";
27
    public static final String PROJECT_CONFIGURATION_NAME = "data";
34
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-bpelpro/1";
28
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-bpelpro/1";
35
    public static final String PRIVATE_CONFIGURATION_NAME = "data";
29
    public static final String PRIVATE_CONFIGURATION_NAME = "data";
36
    public static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-bpelpro-private/1";
30
    public static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-bpelpro-private/1";
37
    
38
    public BpelproProjectType() {
39
        int i = 0;
40
    }
41
    
42
    public String getType() {
43
        return TYPE;
44
    }
45
    
46
    public Project createProject(AntProjectHelper helper) throws IOException {
47
        if (null == helper)
48
            throw new IllegalArgumentException("helper");
49
        return new BpelproProject(helper);
50
    }
51
52
    public String getPrimaryConfigurationDataElementName(boolean shared) {
53
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
54
    }
55
    
56
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
57
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
58
    }
59
}
31
}
(-)bpel.project/src/org/netbeans/modules/bpel/project/IcanproProject.java (+7 lines)
 Lines 59-64    Link Here 
59
import org.openide.util.Utilities;
59
import org.openide.util.Utilities;
60
import org.openide.util.lookup.Lookups;
60
import org.openide.util.lookup.Lookups;
61
import org.netbeans.spi.project.AuxiliaryConfiguration;
61
import org.netbeans.spi.project.AuxiliaryConfiguration;
62
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
62
import org.netbeans.spi.project.support.ant.EditableProperties;
63
import org.netbeans.spi.project.support.ant.EditableProperties;
63
import org.openide.DialogDescriptor;
64
import org.openide.DialogDescriptor;
64
import org.openide.DialogDisplayer;
65
import org.openide.DialogDisplayer;
 Lines 72-77    Link Here 
72
 * Represents one ejb module project
73
 * Represents one ejb module project
73
 * @author Chris Webster
74
 * @author Chris Webster
74
 */
75
 */
76
@AntBasedProjectRegistration(
77
    type=IcanproProjectType.TYPE,
78
    iconResource="org/netbeans/modules/bpel/project/ui/resources/icanproProjectIcon.gif",
79
    sharedNamespace=IcanproProjectType.PROJECT_CONFIGURATION_NAMESPACE,
80
    privateNamespace=IcanproProjectType.PRIVATE_CONFIGURATION_NAMESPACE
81
)
75
public final class IcanproProject implements Project, AntProjectListener {
82
public final class IcanproProject implements Project, AntProjectListener {
76
83
77
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/bpel/project/ui/resources/icanproProjectIcon.gif")); // NOI18N
84
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/bpel/project/ui/resources/icanproProjectIcon.gif")); // NOI18N
(-)bpel.project/src/org/netbeans/modules/bpel/project/IcanproProjectType.java (-33 / +2 lines)
 Lines 20-62    Link Here 
20
20
21
package org.netbeans.modules.bpel.project;
21
package org.netbeans.modules.bpel.project;
22
22
23
import java.io.IOException;
24
import org.netbeans.api.project.Project;
25
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
26
import org.netbeans.spi.project.support.ant.AntProjectHelper;
27
28
/**
23
/**
29
 * Factory for EJB Module projects
24
 * Factory for EJB Module projects
30
 * @author Chris Webster
25
 * @author Chris Webster
31
 */
26
 */
32
public class IcanproProjectType implements AntBasedProjectType, IcanproConstants {
27
public class IcanproProjectType implements IcanproConstants {
33
    public static final String TYPE = " org.netbeans.modules.bpel.project";
28
    public static final String TYPE = " org.netbeans.modules.bpel.project";
34
    private static final String PROJECT_CONFIGURATION_NAME = "data";
35
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-icanpro/1";
29
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-icanpro/1";
36
    private static final String PRIVATE_CONFIGURATION_NAME = "data";
30
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-icanpro-private/1";
37
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-icanpro-private/1";
38
    
39
    
40
    public IcanproProjectType() {
41
        int i = 0;
42
    }
43
    
44
    public String getType() {
45
        return TYPE;
46
    }
47
    
48
    public Project createProject(AntProjectHelper helper) throws IOException {
49
        if (null == helper)
50
            throw new IllegalArgumentException("helper");
51
        return new IcanproProject(helper);
52
    }
53
54
    public String getPrimaryConfigurationDataElementName(boolean shared) {
55
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
56
    }
57
    
58
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
59
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
60
    }
61
    
62
}
31
}
(-)cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/MakeProject.java (-1 / +8 lines)
 Lines 77-82    Link Here 
77
import org.netbeans.modules.cnd.utils.MIMENames;
77
import org.netbeans.modules.cnd.utils.MIMENames;
78
import org.netbeans.spi.project.AuxiliaryConfiguration;
78
import org.netbeans.spi.project.AuxiliaryConfiguration;
79
import org.netbeans.spi.project.SubprojectProvider;
79
import org.netbeans.spi.project.SubprojectProvider;
80
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
80
import org.netbeans.spi.project.support.ant.AntProjectEvent;
81
import org.netbeans.spi.project.support.ant.AntProjectEvent;
81
import org.netbeans.spi.project.support.ant.AntProjectHelper;
82
import org.netbeans.spi.project.support.ant.AntProjectHelper;
82
import org.netbeans.spi.project.support.ant.AntProjectListener;
83
import org.netbeans.spi.project.support.ant.AntProjectListener;
 Lines 108-113    Link Here 
108
/**
109
/**
109
 * Represents one plain Make project.
110
 * Represents one plain Make project.
110
 */
111
 */
112
@AntBasedProjectRegistration(
113
    iconResource=MakeConfigurationDescriptor.ICON,
114
    type=MakeProjectType.TYPE,
115
    sharedNamespace=MakeProjectType.PROJECT_CONFIGURATION_NAMESPACE,
116
    privateNamespace=MakeProjectType.PRIVATE_CONFIGURATION_NAMESPACE
117
)
111
public final class MakeProject implements Project, AntProjectListener {
118
public final class MakeProject implements Project, AntProjectListener {
112
119
113
//    private static final Icon MAKE_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/cnd/makeproject/ui/resources/makeProject.gif")); // NOI18N
120
//    private static final Icon MAKE_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/cnd/makeproject/ui/resources/makeProject.gif")); // NOI18N
 Lines 129-135    Link Here 
129
    private Set<String> cppExtensions = MakeProject.createExtensionSet();
136
    private Set<String> cppExtensions = MakeProject.createExtensionSet();
130
    private String sourceEncoding = null;
137
    private String sourceEncoding = null;
131
138
132
    MakeProject(AntProjectHelper helper) throws IOException {
139
    public MakeProject(AntProjectHelper helper) throws IOException {
133
        this.helper = helper;
140
        this.helper = helper;
134
        eval = createEvaluator();
141
        eval = createEvaluator();
135
        AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
142
        AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
(-)cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/MakeProjectType.java (-30 / +2 lines)
 Lines 41-83    Link Here 
41
41
42
package org.netbeans.modules.cnd.makeproject;
42
package org.netbeans.modules.cnd.makeproject;
43
43
44
import java.io.IOException;
45
import org.netbeans.api.project.Project;
46
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
47
import org.netbeans.spi.project.support.ant.AntProjectHelper;
48
49
/**
44
/**
50
 * Factory for simple Make projects.
45
 * Factory for simple Make projects.
51
 */
46
 */
52
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
47
public final class MakeProjectType {
53
public final class MakeProjectType implements AntBasedProjectType {
54
48
55
    public static final String TYPE = "org.netbeans.modules.cnd.makeproject"; // NOI18N
49
    public static final String TYPE = "org.netbeans.modules.cnd.makeproject"; // NOI18N
56
    private static final String PROJECT_CONFIGURATION_NAME = "data"; // NOI18N
57
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/make-project/1"; // NOI18N
50
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/make-project/1"; // NOI18N
58
    private static final String PRIVATE_CONFIGURATION_NAME = "data"; // NOI18N
51
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/make-project-private/1"; // NOI18N
59
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/make-project-private/1"; // NOI18N
60
    public static final String MAKE_DEP_PROJECTS = "make-dep-projects"; // NOI18N
52
    public static final String MAKE_DEP_PROJECTS = "make-dep-projects"; // NOI18N
61
    public static final String MAKE_DEP_PROJECT = "make-dep-project"; // NOI18N
53
    public static final String MAKE_DEP_PROJECT = "make-dep-project"; // NOI18N
62
    public static final String SOURCE_ENCODING_TAG = "sourceEncoding"; // NOI18N
54
    public static final String SOURCE_ENCODING_TAG = "sourceEncoding"; // NOI18N
63
    
64
    /** Do nothing, just a service. */
65
    public MakeProjectType() {}
66
    
67
    public String getType() {
68
        return TYPE;
69
    }
70
    
71
    public Project createProject(AntProjectHelper helper) throws IOException {
72
        return new MakeProject(helper);
73
    }
74
75
    public String getPrimaryConfigurationDataElementName(boolean shared) {
76
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
77
    }
78
    
79
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
80
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
81
    }
82
    
83
}
55
}
(-)compapp.projects.base/nbproject/project.xml (-1 / +1 lines)
 Lines 101-107    Link Here 
101
                    <compile-dependency/>
101
                    <compile-dependency/>
102
                    <run-dependency>
102
                    <run-dependency>
103
                        <release-version>1</release-version>
103
                        <release-version>1</release-version>
104
                        <specification-version>1.12.1</specification-version>
104
                        <specification-version>1.30</specification-version>
105
                    </run-dependency>
105
                    </run-dependency>
106
                </dependency>
106
                </dependency>
107
                <dependency>
107
                <dependency>
(-)compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/IcanproProject.java (+7 lines)
 Lines 62-67    Link Here 
62
import org.openide.util.Utilities;
62
import org.openide.util.Utilities;
63
import org.openide.util.lookup.Lookups;
63
import org.openide.util.lookup.Lookups;
64
import org.netbeans.spi.project.AuxiliaryConfiguration;
64
import org.netbeans.spi.project.AuxiliaryConfiguration;
65
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
65
import org.netbeans.spi.project.support.ant.EditableProperties;
66
import org.netbeans.spi.project.support.ant.EditableProperties;
66
import org.w3c.dom.Element;
67
import org.w3c.dom.Element;
67
import org.w3c.dom.Node;
68
import org.w3c.dom.Node;
 Lines 72-77    Link Here 
72
 * Represents one ejb module project
73
 * Represents one ejb module project
73
 * @author Chris Webster
74
 * @author Chris Webster
74
 */
75
 */
76
@AntBasedProjectRegistration(
77
    type=IcanproProjectType.TYPE,
78
    iconResource="org/netbeans/modules/compapp/projects/base/ui/resources/icanproProjectIcon.gif",
79
    sharedNamespace=IcanproProjectType.PROJECT_CONFIGURATION_NAMESPACE,
80
    privateNamespace=IcanproProjectType.PRIVATE_CONFIGURATION_NAMESPACE
81
)
75
public final class IcanproProject implements Project, AntProjectListener {
82
public final class IcanproProject implements Project, AntProjectListener {
76
83
77
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/compapp/projects/base/ui/resources/icanproProjectIcon.gif")); // NOI18N
84
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/compapp/projects/base/ui/resources/icanproProjectIcon.gif")); // NOI18N
(-)compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/IcanproProjectType.java (-34 / +2 lines)
 Lines 20-63    Link Here 
20
20
21
package org.netbeans.modules.compapp.projects.base;
21
package org.netbeans.modules.compapp.projects.base;
22
22
23
import java.io.IOException;
24
import org.netbeans.api.project.Project;
25
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
26
import org.netbeans.spi.project.support.ant.AntProjectHelper;
27
28
/**
23
/**
29
 * Factory for EJB Module projects
24
 * Factory for EJB Module projects
30
 * @author Chris Webster
25
 * @author Chris Webster
31
 */
26
 */
32
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
27
public class IcanproProjectType implements IcanproConstants {
33
public class IcanproProjectType implements AntBasedProjectType, IcanproConstants {
34
    public static final String TYPE = "org.netbeans.modules.compapp.projects.base";
28
    public static final String TYPE = "org.netbeans.modules.compapp.projects.base";
35
    private static final String PROJECT_CONFIGURATION_NAME = "data";
36
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-icanpro/1";
29
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-icanpro/1";
37
    private static final String PRIVATE_CONFIGURATION_NAME = "data";
30
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-icanpro-private/1";
38
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-icanpro-private/1";
39
    
40
    
41
    public IcanproProjectType() {
42
        int i = 0;
43
    }
44
    
45
    public String getType() {
46
        return TYPE;
47
    }
48
    
49
    public Project createProject(AntProjectHelper helper) throws IOException {
50
        if (null == helper)
51
            throw new IllegalArgumentException("helper");
52
        return new IcanproProject(helper);
53
    }
54
55
    public String getPrimaryConfigurationDataElementName(boolean shared) {
56
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
57
    }
58
    
59
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
60
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
61
    }
62
    
63
}
31
}
(-)compapp.projects.jbi/nbproject/project.xml (-1 / +1 lines)
 Lines 201-207    Link Here 
201
                    <compile-dependency/>
201
                    <compile-dependency/>
202
                    <run-dependency>
202
                    <run-dependency>
203
                        <release-version>1</release-version>
203
                        <release-version>1</release-version>
204
                        <specification-version>1.11.1</specification-version>
204
                        <specification-version>1.30</specification-version>
205
                    </run-dependency>
205
                    </run-dependency>
206
                </dependency>
206
                </dependency>
207
                <dependency>
207
                <dependency>
(-)compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/JbiProject.java (-12 / +7 lines)
 Lines 103-108    Link Here 
103
 *
103
 *
104
 * @author Chris Webster
104
 * @author Chris Webster
105
 */
105
 */
106
@AntBasedProjectRegistration(
107
    type=JbiProjectType.TYPE,
108
    iconResource="org/netbeans/modules/compapp/projects/jbi/ui/resources/composite_application_project.png",
109
    sharedNamespace=JbiProjectType.PROJECT_CONFIGURATION_NAMESPACE,
110
    privateNamespace=JbiProjectType.PRIVATE_CONFIGURATION_NAMESPACE
111
)
106
public final class JbiProject implements Project, AntProjectListener, ProjectPropertyProvider {
112
public final class JbiProject implements Project, AntProjectListener, ProjectPropertyProvider {
107
    private static final Icon PROJECT_ICON = new ImageIcon(
113
    private static final Icon PROJECT_ICON = new ImageIcon(
108
            ImageUtilities.loadImage(
114
            ImageUtilities.loadImage(
 Lines 163-169    Link Here 
163
    private final ReferenceHelper refHelper;
169
    private final ReferenceHelper refHelper;
164
    private final GeneratedFilesHelper genFilesHelper;
170
    private final GeneratedFilesHelper genFilesHelper;
165
    private final Lookup lookup;
171
    private final Lookup lookup;
166
    private AntBasedProjectType abpt;
167
    private JbiLogicalViewProvider lvp;    
172
    private JbiLogicalViewProvider lvp;    
168
    private FileChangeListener casaFileListener;
173
    private FileChangeListener casaFileListener;
169
    
174
    
 Lines 178-187    Link Here 
178
     *
183
     *
179
     * @throws IOException DOCUMENT ME!
184
     * @throws IOException DOCUMENT ME!
180
     */
185
     */
181
    public JbiProject(final AntProjectHelper helper, AntBasedProjectType abpt)
186
    public JbiProject(final AntProjectHelper helper)
182
    throws IOException {
187
    throws IOException {
183
        this.helper = helper;
188
        this.helper = helper;
184
        this.abpt = abpt;
185
        eval = createEvaluator();
189
        eval = createEvaluator();
186
        
190
        
187
        AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
191
        AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
 Lines 196-210    Link Here 
196
//                CasaHelper.registerCasaFileListener(JbiProject.this);
200
//                CasaHelper.registerCasaFileListener(JbiProject.this);
197
//            }
201
//            }
198
//        });
202
//        });
199
    }
200
    
201
    /**
202
     * DOCUMENT ME!
203
     *
204
     * @return DOCUMENT ME!
205
     */
206
    public AntBasedProjectType getAntBasedProjectType() {
207
        return abpt;
208
    }
203
    }
209
    
204
    
210
    /**
205
    /**
(-)compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/JbiProjectType.java (-72 / +2 lines)
 Lines 41-130    Link Here 
41
41
42
package org.netbeans.modules.compapp.projects.jbi;
42
package org.netbeans.modules.compapp.projects.jbi;
43
43
44
import org.netbeans.api.project.Project;
45
46
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
47
import org.netbeans.spi.project.support.ant.AntProjectHelper;
48
import org.netbeans.modules.compapp.projects.jbi.JbiProject;
49
import org.openide.util.NbBundle;
50
51
import java.io.IOException;
52
53
54
/**
44
/**
55
 * Factory for EJB Module projects
45
 * Factory for EJB Module projects
56
 *
46
 *
57
 * @author Chris Webster
47
 * @author Chris Webster
58
 */
48
 */
59
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
49
public final class JbiProjectType {
60
public final class JbiProjectType implements AntBasedProjectType {
61
    /**
50
    /**
62
     * DOCUMENT ME!
51
     * DOCUMENT ME!
63
     */
52
     */
64
    public static final String TYPE = "org.netbeans.modules.compapp.projects.jbi"; // NOI18N
53
    public static final String TYPE = "org.netbeans.modules.compapp.projects.jbi"; // NOI18N
65
    private static final String PROJECT_CONFIGURATION_NAME = "data"; // NOI18N
66
54
67
    /**
55
    /**
68
     * DOCUMENT ME!
56
     * DOCUMENT ME!
69
     */
57
     */
70
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-jbi/1"; // NOI18N
58
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-jbi/1"; // NOI18N
71
    private static final String PRIVATE_CONFIGURATION_NAME = "data"; // NOI18N
59
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-jbi-private/1"; // NOI18N
72
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-jbi-private/1"; // NOI18N
73
74
    /**
75
     * Creates a new JbiProjectType object.
76
     */
77
    public JbiProjectType() {
78
        int i = 0;
79
    }
80
81
    /**
82
     * DOCUMENT ME!
83
     *
84
     * @return DOCUMENT ME!
85
     */
86
    public String getType() {
87
        return TYPE;
88
    }
89
90
    /**
91
     * DOCUMENT ME!
92
     *
93
     * @param helper DOCUMENT ME!
94
     *
95
     * @return DOCUMENT ME!
96
     *
97
     * @throws IOException DOCUMENT ME!
98
     * @throws IllegalArgumentException DOCUMENT ME!
99
     */
100
    public Project createProject(AntProjectHelper helper)
101
        throws IOException {
102
        if (null == helper) {
103
            throw new IllegalArgumentException(NbBundle.getMessage(JbiProjectType.class, "MSG_helper")); // NOI18N
104
        }
105
106
        return new JbiProject(helper, this);
107
    }
108
109
    /**
110
     * DOCUMENT ME!
111
     *
112
     * @param shared DOCUMENT ME!
113
     *
114
     * @return DOCUMENT ME!
115
     */
116
    public String getPrimaryConfigurationDataElementName(boolean shared) {
117
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
118
    }
119
120
    /**
121
     * DOCUMENT ME!
122
     *
123
     * @param shared DOCUMENT ME!
124
     *
125
     * @return DOCUMENT ME!
126
     */
127
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
128
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
129
    }
130
}
60
}
(-)compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/ui/customizer/JbiProjectProperties.java (-2 lines)
 Lines 585-591    Link Here 
585
    private HashMap<String, PropertyInfo> properties;
585
    private HashMap<String, PropertyInfo> properties;
586
    private AntProjectHelper antProjectHelper;
586
    private AntProjectHelper antProjectHelper;
587
    private ReferenceHelper refHelper;
587
    private ReferenceHelper refHelper;
588
    private AntBasedProjectType abpt;
589
    private List<VisualClassPathItem> bindingList = new Vector();
588
    private List<VisualClassPathItem> bindingList = new Vector();
590
    private List<AntArtifact> sunresourceProjs;
589
    private List<AntArtifact> sunresourceProjs;
591
    javax.swing.text.Document DIST_JAR_MODEL;
590
    javax.swing.text.Document DIST_JAR_MODEL;
 Lines 604-610    Link Here 
604
        this.properties = new HashMap<String, PropertyInfo>();
603
        this.properties = new HashMap<String, PropertyInfo>();
605
        this.antProjectHelper = antProjectHelper;
604
        this.antProjectHelper = antProjectHelper;
606
        this.refHelper = refHelper;
605
        this.refHelper = refHelper;
607
        this.abpt = project.getAntBasedProjectType();
608
        read();
606
        read();
609
        
607
        
610
        PropertyEvaluator evaluator = antProjectHelper.getStandardPropertyEvaluator();
608
        PropertyEvaluator evaluator = antProjectHelper.getStandardPropertyEvaluator();
(-)j2ee.archive/nbproject/project.xml (-1 / +1 lines)
 Lines 169-175    Link Here 
169
                    <compile-dependency/>
169
                    <compile-dependency/>
170
                    <run-dependency>
170
                    <run-dependency>
171
                        <release-version>1</release-version>
171
                        <release-version>1</release-version>
172
                        <specification-version>1.12.1</specification-version>
172
                        <specification-version>1.30</specification-version>
173
                    </run-dependency>
173
                    </run-dependency>
174
                </dependency>
174
                </dependency>
175
                <dependency>
175
                <dependency>
(-)j2ee.archive/src/org/netbeans/modules/j2ee/archive/project/ArchiveProject.java (+7 lines)
 Lines 77-82    Link Here 
77
import org.netbeans.spi.project.AuxiliaryConfiguration;
77
import org.netbeans.spi.project.AuxiliaryConfiguration;
78
import org.netbeans.spi.project.ant.AntArtifactProvider;
78
import org.netbeans.spi.project.ant.AntArtifactProvider;
79
import org.netbeans.spi.project.support.LookupProviderSupport;
79
import org.netbeans.spi.project.support.LookupProviderSupport;
80
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
80
import org.netbeans.spi.project.support.ant.AntProjectHelper;
81
import org.netbeans.spi.project.support.ant.AntProjectHelper;
81
import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
82
import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
82
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
83
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
 Lines 102-107    Link Here 
102
import org.w3c.dom.NodeList;
103
import org.w3c.dom.NodeList;
103
import org.w3c.dom.Text;
104
import org.w3c.dom.Text;
104
105
106
@AntBasedProjectRegistration(
107
    iconResource="org/netbeans/modules/j2ee/archive/project/resources/packaged_archive_16.png",
108
    type=ArchiveProjectType.TYPE,
109
    sharedNamespace=ArchiveProjectType.PROJECT_CONFIGURATION_NS,
110
    privateNamespace=ArchiveProjectType.PRIVATE_CONFIGURATION_NS
111
)
105
public class ArchiveProject implements org.netbeans.api.project.Project {
112
public class ArchiveProject implements org.netbeans.api.project.Project {
106
    
113
    
107
    private final AuxiliaryConfiguration aux;
114
    private final AuxiliaryConfiguration aux;
(-)j2ee.archive/src/org/netbeans/modules/j2ee/archive/project/ArchiveProjectType.java (-31 / +2 lines)
 Lines 41-77    Link Here 
41
41
42
package org.netbeans.modules.j2ee.archive.project;
42
package org.netbeans.modules.j2ee.archive.project;
43
43
44
import java.io.IOException;
44
public class ArchiveProjectType {
45
import org.netbeans.api.project.Project;
46
import org.netbeans.spi.project.support.ant.AntProjectHelper;
47
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
48
49
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
50
public class ArchiveProjectType implements AntBasedProjectType {
51
    
52
    private static final String CONFIGURATION_NAME ="data";            //NOI18N
53
    public static final String PROJECT_CONFIGURATION_NS ="http://www.netbeans.org/ns/archive-project/1";                     //NOI18N
45
    public static final String PROJECT_CONFIGURATION_NS ="http://www.netbeans.org/ns/archive-project/1";                     //NOI18N
54
    private static final String PRIVATE_CONFIGURATION_NS = "http://www.netbeans.org/ns/archive-project-private/1";             //NOI18N
46
    static final String PRIVATE_CONFIGURATION_NS = "http://www.netbeans.org/ns/archive-project-private/1";             //NOI18N
55
56
    public static final String TYPE = "org.netbeans.modules.j2ee.archive.project";                        //NOI18N
47
    public static final String TYPE = "org.netbeans.modules.j2ee.archive.project";                        //NOI18N
57
58
    /** Creates a new instance of DeployableArchive */
59
    public ArchiveProjectType() {
60
    }
61
62
    public String getType() {
63
        return TYPE;
64
    }
65
66
    public Project createProject(AntProjectHelper helper) throws IOException {
67
        return new ArchiveProject(helper);
68
    }
69
70
    public String getPrimaryConfigurationDataElementName(boolean shared) {
71
        return CONFIGURATION_NAME;
72
    }
73
    
74
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
75
        return shared ? PROJECT_CONFIGURATION_NS : PRIVATE_CONFIGURATION_NS;
76
    }
77
}
48
}
(-)j2ee.clientproject/nbproject/project.xml (-1 / +1 lines)
 Lines 236-242    Link Here 
236
                    <compile-dependency/>
236
                    <compile-dependency/>
237
                    <run-dependency>
237
                    <run-dependency>
238
                        <release-version>1</release-version>
238
                        <release-version>1</release-version>
239
                        <specification-version>1.23</specification-version>
239
                        <specification-version>1.30</specification-version>
240
                    </run-dependency>
240
                    </run-dependency>
241
                </dependency>
241
                </dependency>
242
                <dependency>
242
                <dependency>
(-)j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java (-1 / +8 lines)
 Lines 105-110    Link Here 
105
import org.netbeans.spi.project.ant.AntBuildExtenderFactory;
105
import org.netbeans.spi.project.ant.AntBuildExtenderFactory;
106
import org.netbeans.spi.project.ant.AntBuildExtenderImplementation;
106
import org.netbeans.spi.project.ant.AntBuildExtenderImplementation;
107
import org.netbeans.spi.project.support.LookupProviderSupport;
107
import org.netbeans.spi.project.support.LookupProviderSupport;
108
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
108
import org.netbeans.spi.project.support.ant.AntProjectEvent;
109
import org.netbeans.spi.project.support.ant.AntProjectEvent;
109
import org.netbeans.spi.project.support.ant.AntProjectHelper;
110
import org.netbeans.spi.project.support.ant.AntProjectHelper;
110
import org.netbeans.spi.project.support.ant.AntProjectListener;
111
import org.netbeans.spi.project.support.ant.AntProjectListener;
 Lines 147-152    Link Here 
147
 * Represents one plain Application Client project.
148
 * Represents one plain Application Client project.
148
 * @author Jesse Glick, et al.
149
 * @author Jesse Glick, et al.
149
 */
150
 */
151
@AntBasedProjectRegistration(
152
    iconResource="org/netbeans/modules/j2ee/clientproject/ui/resources/appclient.gif",
153
    type=AppClientProjectType.TYPE,
154
    sharedNamespace=AppClientProjectType.PROJECT_CONFIGURATION_NAMESPACE,
155
    privateNamespace=AppClientProjectType.PRIVATE_CONFIGURATION_NAMESPACE
156
)
150
public final class AppClientProject implements Project, AntProjectListener, FileChangeListener {
157
public final class AppClientProject implements Project, AntProjectListener, FileChangeListener {
151
    
158
    
152
    private static final Icon CAR_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/clientproject/ui/resources/appclient.gif")); // NOI18N
159
    private static final Icon CAR_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/clientproject/ui/resources/appclient.gif")); // NOI18N
 Lines 181-187    Link Here 
181
    // use AntBuildExtender to enable Ant Extensibility
188
    // use AntBuildExtender to enable Ant Extensibility
182
    private AntBuildExtender buildExtender;
189
    private AntBuildExtender buildExtender;
183
    
190
    
184
    AppClientProject(AntProjectHelper helper) throws IOException {
191
    public AppClientProject(AntProjectHelper helper) throws IOException {
185
        this.helper = helper;
192
        this.helper = helper;
186
        eval = createEvaluator();
193
        eval = createEvaluator();
187
        aux = helper.createAuxiliaryConfiguration();
194
        aux = helper.createAuxiliaryConfiguration();
(-)j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProjectType.java (-29 / +2 lines)
 Lines 41-81    Link Here 
41
41
42
package org.netbeans.modules.j2ee.clientproject;
42
package org.netbeans.modules.j2ee.clientproject;
43
43
44
import java.io.IOException;
45
import org.netbeans.api.project.Project;
46
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
47
import org.netbeans.spi.project.support.ant.AntProjectHelper;
48
49
/**
44
/**
50
 * Factory for simple J2SE projects.
45
 * Factory for simple J2SE projects.
51
 * @author Jesse Glick
46
 * @author Jesse Glick
52
 */
47
 */
53
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
48
public final class AppClientProjectType {
54
public final class AppClientProjectType implements AntBasedProjectType {
55
    
56
    public static final String TYPE = "org.netbeans.modules.j2ee.clientproject"; // NOI18N
49
    public static final String TYPE = "org.netbeans.modules.j2ee.clientproject"; // NOI18N
57
    private static final String PROJECT_CONFIGURATION_NAME = "data"; // NOI18N
50
    private static final String PROJECT_CONFIGURATION_NAME = "data"; // NOI18N
58
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/car-project/1"; // NOI18N
51
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/car-project/1"; // NOI18N
59
    private static final String PRIVATE_CONFIGURATION_NAME = "data"; // NOI18N
52
    private static final String PRIVATE_CONFIGURATION_NAME = "data"; // NOI18N
60
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/car-project-private/1"; // NOI18N
53
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/car-project-private/1"; // NOI18N
61
    
62
    /** Do nothing, just a service. */
63
    public AppClientProjectType() {}
64
    
65
    public String getType() {
66
        return TYPE;
67
    }
68
    
69
    public Project createProject(AntProjectHelper helper) throws IOException {
70
        return new AppClientProject(helper);
71
    }
72
73
    public String getPrimaryConfigurationDataElementName(boolean shared) {
74
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
75
    }
76
    
77
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
78
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
79
    }
80
    
81
}
54
}
(-)j2ee.earproject/nbproject/project.xml (-1 / +1 lines)
 Lines 210-216    Link Here 
210
                    <compile-dependency/>
210
                    <compile-dependency/>
211
                    <run-dependency>
211
                    <run-dependency>
212
                        <release-version>1</release-version>
212
                        <release-version>1</release-version>
213
                        <specification-version>1.23</specification-version>
213
                        <specification-version>1.30</specification-version>
214
                    </run-dependency>
214
                    </run-dependency>
215
                </dependency>
215
                </dependency>
216
                <dependency>
216
                <dependency>
(-)j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProject.java (-6 / +10 lines)
 Lines 87-93    Link Here 
87
import org.netbeans.spi.project.ant.AntBuildExtenderFactory;
87
import org.netbeans.spi.project.ant.AntBuildExtenderFactory;
88
import org.netbeans.spi.project.ant.AntBuildExtenderImplementation;
88
import org.netbeans.spi.project.ant.AntBuildExtenderImplementation;
89
import org.netbeans.spi.project.support.LookupProviderSupport;
89
import org.netbeans.spi.project.support.LookupProviderSupport;
90
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
90
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
91
import org.netbeans.spi.project.support.ant.AntProjectEvent;
91
import org.netbeans.spi.project.support.ant.AntProjectEvent;
92
import org.netbeans.spi.project.support.ant.AntProjectHelper;
92
import org.netbeans.spi.project.support.ant.AntProjectHelper;
93
import org.netbeans.spi.project.support.ant.AntProjectListener;
93
import org.netbeans.spi.project.support.ant.AntProjectListener;
 Lines 123-128    Link Here 
123
 *
123
 *
124
 * @author vince kraemer
124
 * @author vince kraemer
125
 */
125
 */
126
@AntBasedProjectRegistration(
127
    iconResource="org/netbeans/modules/j2ee/earproject/ui/resources/projectIcon.gif",
128
    type=EarProjectType.TYPE,
129
    sharedNamespace=EarProjectType.PROJECT_CONFIGURATION_NAMESPACE,
130
    privateNamespace=EarProjectType.PRIVATE_CONFIGURATION_NAMESPACE
131
)
126
public final class EarProject implements Project, AntProjectListener {
132
public final class EarProject implements Project, AntProjectListener {
127
    
133
    
128
    private static final Icon EAR_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/earproject/ui/resources/projectIcon.gif")); // NOI18N
134
    private static final Icon EAR_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/earproject/ui/resources/projectIcon.gif")); // NOI18N
 Lines 135-141    Link Here 
135
    private final Lookup lookup;
141
    private final Lookup lookup;
136
    private final ProjectEar appModule;
142
    private final ProjectEar appModule;
137
    private final Ear ear;
143
    private final Ear ear;
138
    private final AntBasedProjectType abpt;
139
    private final UpdateHelper updateHelper;
144
    private final UpdateHelper updateHelper;
140
    private final UpdateProjectImpl updateProject;
145
    private final UpdateProjectImpl updateProject;
141
    private final ClassPathProviderImpl cpProvider;
146
    private final ClassPathProviderImpl cpProvider;
 Lines 144-152    Link Here 
144
    private AntBuildExtender buildExtender;
149
    private AntBuildExtender buildExtender;
145
    public ClassPathSupport cs;
150
    public ClassPathSupport cs;
146
            
151
            
147
    EarProject(final AntProjectHelper helper, AntBasedProjectType abpt) throws IOException {
152
    public EarProject(final AntProjectHelper helper) throws IOException {
148
        this.helper = helper;
153
        this.helper = helper;
149
        this.abpt = abpt;
150
        eval = createEvaluator();
154
        eval = createEvaluator();
151
        AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
155
        AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
152
        refHelper = new ReferenceHelper(helper, aux, helper.getStandardPropertyEvaluator());
156
        refHelper = new ReferenceHelper(helper, aux, helper.getStandardPropertyEvaluator());
 Lines 222-230    Link Here 
222
            new ProjectEarProvider(),
226
            new ProjectEarProvider(),
223
            appModule, //implements J2eeModuleProvider
227
            appModule, //implements J2eeModuleProvider
224
            new EarActionProvider(this, updateHelper),
228
            new EarActionProvider(this, updateHelper),
225
            new J2eeArchiveLogicalViewProvider(this, updateHelper, evaluator(), refHelper, abpt),
229
            new J2eeArchiveLogicalViewProvider(this, updateHelper, evaluator(), refHelper),
226
            new MyIconBaseProvider(),
230
            new MyIconBaseProvider(),
227
            new CustomizerProviderImpl(this, helper, refHelper, abpt),
231
            new CustomizerProviderImpl(this, helper, refHelper),
228
            LookupMergerSupport.createClassPathProviderMerger(cpProvider),
232
            LookupMergerSupport.createClassPathProviderMerger(cpProvider),
229
            new ProjectXmlSavedHookImpl(),
233
            new ProjectXmlSavedHookImpl(),
230
            UILookupMergerSupport.createProjectOpenHookMerger(new ProjectOpenedHookImpl()),
234
            UILookupMergerSupport.createProjectOpenHookMerger(new ProjectOpenedHookImpl()),
(-)j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProjectType.java (-33 / +2 lines)
 Lines 41-84    Link Here 
41
41
42
package org.netbeans.modules.j2ee.earproject;
42
package org.netbeans.modules.j2ee.earproject;
43
43
44
import java.io.IOException;
45
import org.netbeans.api.project.Project;
46
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
47
import org.netbeans.spi.project.support.ant.AntProjectHelper;
48
/**
44
/**
49
 * Factory for Enterprise Applications
45
 * Factory for Enterprise Applications
50
 * @see WebProjectType
46
 * @see WebProjectType
51
 * @author vince kraemer
47
 * @author vince kraemer
52
 */
48
 */
53
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
49
public final class EarProjectType {
54
public final class EarProjectType implements AntBasedProjectType {
55
56
    public static final String TYPE = "org.netbeans.modules.j2ee.earproject";
50
    public static final String TYPE = "org.netbeans.modules.j2ee.earproject";
57
    private static final String PROJECT_CONFIGURATION_NAME = "data";
58
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-earproject/2";
51
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-earproject/2";
59
    private static final String PRIVATE_CONFIGURATION_NAME = "data";
52
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-earproject-private/1";
60
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-earproject-private/1";
61
    
62
    /** Do nothing, just a service. */
63
    public EarProjectType() {}
64
    
65
    public String getType() {
66
        return TYPE;
67
    }
68
    
69
    public Project createProject(AntProjectHelper helper) throws IOException {
70
        if (null == helper) {
71
            throw new IllegalArgumentException("helper");
72
        }
73
        return new EarProject(helper, this);
74
    }
75
76
    public String getPrimaryConfigurationDataElementName(boolean shared) {
77
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
78
    }
79
    
80
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
81
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
82
    }
83
    
84
}
53
}
(-)j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ui/J2eeArchiveLogicalViewProvider.java (-5 / +1 lines)
 Lines 81-87    Link Here 
81
import org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport;
81
import org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport;
82
import org.netbeans.spi.java.project.support.ui.PackageView;
82
import org.netbeans.spi.java.project.support.ui.PackageView;
83
import org.netbeans.spi.project.ActionProvider;
83
import org.netbeans.spi.project.ActionProvider;
84
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
85
import org.netbeans.spi.project.support.ant.AntProjectHelper;
84
import org.netbeans.spi.project.support.ant.AntProjectHelper;
86
import org.netbeans.spi.project.support.ant.EditableProperties;
85
import org.netbeans.spi.project.support.ant.EditableProperties;
87
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
86
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
 Lines 123-134    Link Here 
123
    protected final ReferenceHelper resolver;
122
    protected final ReferenceHelper resolver;
124
    private final List<? extends Action> specialActions =
123
    private final List<? extends Action> specialActions =
125
            Collections.singletonList(SystemAction.get(AddModuleAction.class));
124
            Collections.singletonList(SystemAction.get(AddModuleAction.class));
126
    private final AntBasedProjectType abpt;
127
    private final ChangeSupport changeSupport = new ChangeSupport(this);
125
    private final ChangeSupport changeSupport = new ChangeSupport(this);
128
    
126
    
129
    public J2eeArchiveLogicalViewProvider(EarProject project, UpdateHelper helper,
127
    public J2eeArchiveLogicalViewProvider(EarProject project, UpdateHelper helper,
130
            PropertyEvaluator evaluator, ReferenceHelper resolver,
128
            PropertyEvaluator evaluator, ReferenceHelper resolver) {
131
            AntBasedProjectType abpt) {
132
        this.project = project;
129
        this.project = project;
133
        assert project != null;
130
        assert project != null;
134
        this.helper = helper;
131
        this.helper = helper;
 Lines 136-142    Link Here 
136
        this.evaluator = evaluator;
133
        this.evaluator = evaluator;
137
        assert evaluator != null;
134
        assert evaluator != null;
138
        this.resolver = resolver;
135
        this.resolver = resolver;
139
        this.abpt = abpt;
140
    }
136
    }
141
    
137
    
142
    public Node createLogicalView() {
138
    public Node createLogicalView() {
(-)j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ui/customizer/CustomizerProviderImpl.java (-4 / +1 lines)
 Lines 52-58    Link Here 
52
import org.netbeans.api.project.Project;
52
import org.netbeans.api.project.Project;
53
import org.netbeans.api.project.ProjectUtils;
53
import org.netbeans.api.project.ProjectUtils;
54
import org.netbeans.modules.j2ee.earproject.EarProject;
54
import org.netbeans.modules.j2ee.earproject.EarProject;
55
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
56
import org.netbeans.spi.project.support.ant.AntProjectHelper;
55
import org.netbeans.spi.project.support.ant.AntProjectHelper;
57
import org.netbeans.spi.project.support.ant.ReferenceHelper;
56
import org.netbeans.spi.project.support.ant.ReferenceHelper;
58
import org.netbeans.spi.project.ui.CustomizerProvider;
57
import org.netbeans.spi.project.ui.CustomizerProvider;
 Lines 71-87    Link Here 
71
    private final EarProject project;
70
    private final EarProject project;
72
    private final AntProjectHelper antProjectHelper;   
71
    private final AntProjectHelper antProjectHelper;   
73
    private final ReferenceHelper refHelper;
72
    private final ReferenceHelper refHelper;
74
    private final AntBasedProjectType abpt;
75
    
73
    
76
    private static Map<Project, Dialog> project2Dialog = new HashMap<Project, Dialog>();
74
    private static Map<Project, Dialog> project2Dialog = new HashMap<Project, Dialog>();
77
    
75
    
78
    public static final String CUSTOMIZER_FOLDER_PATH = "Projects/org-netbeans-modules-j2ee-earproject/Customizer"; //NO18N
76
    public static final String CUSTOMIZER_FOLDER_PATH = "Projects/org-netbeans-modules-j2ee-earproject/Customizer"; //NO18N
79
     
77
     
80
    public CustomizerProviderImpl(EarProject project, AntProjectHelper antProjectHelper, ReferenceHelper refHelper, AntBasedProjectType abpt) {
78
    public CustomizerProviderImpl(EarProject project, AntProjectHelper antProjectHelper, ReferenceHelper refHelper) {
81
        this.project = project;
79
        this.project = project;
82
        this.antProjectHelper = antProjectHelper;
80
        this.antProjectHelper = antProjectHelper;
83
        this.refHelper = refHelper;
81
        this.refHelper = refHelper;
84
        this.abpt = abpt;
85
    }
82
    }
86
    
83
    
87
    public void showCustomizer() {
84
    public void showCustomizer() {
(-)j2ee.ejbjarproject/nbproject/project.xml (-1 / +1 lines)
 Lines 280-286    Link Here 
280
                    <compile-dependency/>
280
                    <compile-dependency/>
281
                    <run-dependency>
281
                    <run-dependency>
282
                        <release-version>1</release-version>
282
                        <release-version>1</release-version>
283
                        <specification-version>1.23</specification-version>
283
                        <specification-version>1.30</specification-version>
284
                    </run-dependency>
284
                    </run-dependency>
285
                </dependency>
285
                </dependency>
286
                <dependency>
286
                <dependency>
(-)j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java (-1 / +8 lines)
 Lines 159-164    Link Here 
159
import org.netbeans.spi.java.project.support.ExtraSourceJavadocSupport;
159
import org.netbeans.spi.java.project.support.ExtraSourceJavadocSupport;
160
import org.netbeans.spi.java.project.support.LookupMergerSupport;
160
import org.netbeans.spi.java.project.support.LookupMergerSupport;
161
import org.netbeans.spi.project.support.LookupProviderSupport;
161
import org.netbeans.spi.project.support.LookupProviderSupport;
162
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
162
import org.netbeans.spi.project.support.ant.PropertyUtils;
163
import org.netbeans.spi.project.support.ant.PropertyUtils;
163
import org.netbeans.spi.project.ui.support.UILookupMergerSupport;
164
import org.netbeans.spi.project.ui.support.UILookupMergerSupport;
164
import org.netbeans.spi.queries.FileEncodingQueryImplementation;
165
import org.netbeans.spi.queries.FileEncodingQueryImplementation;
 Lines 175-180    Link Here 
175
 * Represents one ejb module project
176
 * Represents one ejb module project
176
 * @author Chris Webster
177
 * @author Chris Webster
177
 */
178
 */
179
@AntBasedProjectRegistration(
180
    iconResource="org/netbeans/modules/j2ee/ejbjarproject/ui/resources/ejbjarProjectIcon.gif",
181
    type=EjbJarProjectType.TYPE,
182
    sharedNamespace=EjbJarProjectType.PROJECT_CONFIGURATION_NAMESPACE,
183
    privateNamespace=EjbJarProjectType.PRIVATE_CONFIGURATION_NAMESPACE
184
)
178
public class EjbJarProject implements Project, AntProjectListener, FileChangeListener {
185
public class EjbJarProject implements Project, AntProjectListener, FileChangeListener {
179
    
186
    
180
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/ejbjarproject/ui/resources/ejbjarProjectIcon.gif")); // NOI18N
187
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/ejbjarproject/ui/resources/ejbjarProjectIcon.gif")); // NOI18N
 Lines 268-274    Link Here 
268
        }
275
        }
269
    };*/
276
    };*/
270
    
277
    
271
    EjbJarProject(final AntProjectHelper helper) throws IOException {
278
    public EjbJarProject(final AntProjectHelper helper) throws IOException {
272
        this.helper = helper;
279
        this.helper = helper;
273
        eval = createEvaluator();
280
        eval = createEvaluator();
274
        aux = helper.createAuxiliaryConfiguration();
281
        aux = helper.createAuxiliaryConfiguration();
(-)j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProjectType.java (-31 / +2 lines)
 Lines 41-81    Link Here 
41
41
42
package org.netbeans.modules.j2ee.ejbjarproject;
42
package org.netbeans.modules.j2ee.ejbjarproject;
43
43
44
import java.io.IOException;
45
import org.netbeans.api.project.Project;
46
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
47
import org.netbeans.spi.project.support.ant.AntProjectHelper;
48
49
/**
44
/**
50
 * Factory for EJB Module projects
45
 * Factory for EJB Module projects
51
 * @author Chris Webster
46
 * @author Chris Webster
52
 */
47
 */
53
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
48
public final class EjbJarProjectType {
54
public final class EjbJarProjectType implements AntBasedProjectType {
55
56
    public static final String TYPE = "org.netbeans.modules.j2ee.ejbjarproject"; // NOI18N
49
    public static final String TYPE = "org.netbeans.modules.j2ee.ejbjarproject"; // NOI18N
57
    private static final String PROJECT_CONFIGURATION_NAME = "data"; // NOI18N
58
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-ejbjarproject/3"; // NOI18N
50
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-ejbjarproject/3"; // NOI18N
59
    private static final String PRIVATE_CONFIGURATION_NAME = "data"; // NOI18N
51
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-ejbjarproject-private/1"; // NOI18N
60
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-ejbjarproject-private/1"; // NOI18N
61
    
62
    public String getType() {
63
        return TYPE;
64
    }
65
    
66
    public Project createProject(AntProjectHelper helper) throws IOException {
67
        if (null == helper) {
68
            throw new IllegalArgumentException("helper"); // NOI18N
69
        }
70
        return new EjbJarProject(helper);
71
    }
72
73
    public String getPrimaryConfigurationDataElementName(boolean shared) {
74
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
75
    }
76
    
77
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
78
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
79
    }
80
    
81
}
52
}
(-)java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java (-1 / +10 lines)
 Lines 98-103    Link Here 
98
import org.netbeans.spi.project.ant.AntBuildExtenderFactory;
98
import org.netbeans.spi.project.ant.AntBuildExtenderFactory;
99
import org.netbeans.spi.project.support.LookupProviderSupport;
99
import org.netbeans.spi.project.support.LookupProviderSupport;
100
import org.netbeans.spi.project.ant.AntBuildExtenderImplementation;
100
import org.netbeans.spi.project.ant.AntBuildExtenderImplementation;
101
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
101
import org.netbeans.spi.project.support.ant.AntProjectEvent;
102
import org.netbeans.spi.project.support.ant.AntProjectEvent;
102
import org.netbeans.spi.project.support.ant.AntProjectHelper;
103
import org.netbeans.spi.project.support.ant.AntProjectHelper;
103
import org.netbeans.spi.project.support.ant.AntProjectListener;
104
import org.netbeans.spi.project.support.ant.AntProjectListener;
 Lines 139-144    Link Here 
139
 * Represents one plain J2SE project.
140
 * Represents one plain J2SE project.
140
 * @author Jesse Glick, et al.
141
 * @author Jesse Glick, et al.
141
 */
142
 */
143
@AntBasedProjectRegistration(
144
    type=J2SEProjectType.TYPE,
145
    iconResource="org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png", // NOI18N
146
    sharedName=J2SEProjectType.PROJECT_CONFIGURATION_NAME,
147
    sharedNamespace= J2SEProjectType.PROJECT_CONFIGURATION_NAMESPACE,
148
    privateName=J2SEProjectType.PRIVATE_CONFIGURATION_NAME,
149
    privateNamespace= J2SEProjectType.PRIVATE_CONFIGURATION_NAMESPACE
150
)
142
public final class J2SEProject implements Project, AntProjectListener {
151
public final class J2SEProject implements Project, AntProjectListener {
143
    
152
    
144
    private static final Icon J2SE_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png")); // NOI18N
153
    private static final Icon J2SE_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png")); // NOI18N
 Lines 159-165    Link Here 
159
168
160
    private AntBuildExtender buildExtender;
169
    private AntBuildExtender buildExtender;
161
170
162
    J2SEProject(AntProjectHelper helper) throws IOException {
171
    public J2SEProject(AntProjectHelper helper) throws IOException {
163
        this.helper = helper;
172
        this.helper = helper;
164
        eval = createEvaluator();
173
        eval = createEvaluator();
165
        aux = helper.createAuxiliaryConfiguration();
174
        aux = helper.createAuxiliaryConfiguration();
(-)java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectType.java (-39 / +5 lines)
 Lines 41-87    Link Here 
41
41
42
package org.netbeans.modules.java.j2seproject;
42
package org.netbeans.modules.java.j2seproject;
43
43
44
import java.io.IOException;
45
import javax.swing.Icon;
46
import org.netbeans.api.project.Project;
47
import org.netbeans.spi.project.support.ant.AntBasedProjectType2;
48
import org.netbeans.spi.project.support.ant.AntProjectHelper;
49
import org.openide.util.ImageUtilities;
50
51
/**
44
/**
52
 * Factory for simple J2SE projects.
45
 * Constants.
53
 * @author Jesse Glick
54
 */
46
 */
55
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
47
public final class J2SEProjectType {
56
public final class J2SEProjectType implements AntBasedProjectType2 {
57
58
    public static final String TYPE = "org.netbeans.modules.java.j2seproject"; // NOI18N
48
    public static final String TYPE = "org.netbeans.modules.java.j2seproject"; // NOI18N
59
    private static final String PROJECT_CONFIGURATION_NAME = "data"; // NOI18N
49
    static final String PROJECT_CONFIGURATION_NAME = "data"; // NOI18N
60
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2se-project/3"; // NOI18N
50
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2se-project/3"; // NOI18N
61
    private static final String PRIVATE_CONFIGURATION_NAME = "data"; // NOI18N
51
    static final String PRIVATE_CONFIGURATION_NAME = "data"; // NOI18N
62
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2se-project-private/1"; // NOI18N
52
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2se-project-private/1"; // NOI18N
63
    
64
    /** Do nothing, just a service. */
65
    public J2SEProjectType() {}
66
    
67
    public String getType() {
68
        return TYPE;
69
    }
70
    
71
    public Project createProject(AntProjectHelper helper) throws IOException {
72
        return new J2SEProject(helper);
73
    }
74
75
    public String getPrimaryConfigurationDataElementName(boolean shared) {
76
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
77
    }
78
    
79
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
80
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
81
    }
82
83
    public Icon getIcon() {
84
        return ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png", true));
85
    }
86
    
87
}
53
}
(-)mobility.project/nbproject/project.xml (-1 / +1 lines)
 Lines 163-169    Link Here 
163
                    <compile-dependency/>
163
                    <compile-dependency/>
164
                    <run-dependency>
164
                    <run-dependency>
165
                        <release-version>1</release-version>
165
                        <release-version>1</release-version>
166
                        <specification-version>1.6.1</specification-version>
166
                        <specification-version>1.30</specification-version>
167
                    </run-dependency>
167
                    </run-dependency>
168
                </dependency>
168
                </dependency>
169
                <dependency>
169
                <dependency>
(-)mobility.project/src/org/netbeans/modules/mobility/project/J2MEProject.java (-1 / +7 lines)
 Lines 143-148    Link Here 
143
 * Represents one plain J2ME project.
143
 * Represents one plain J2ME project.
144
 * @author Jesse Glick, Adam Sotona, Tim Boudreau
144
 * @author Jesse Glick, Adam Sotona, Tim Boudreau
145
 */
145
 */
146
@AntBasedProjectRegistration(
147
    type=J2MEProjectType.TYPE,
148
    iconResource="org/netbeans/modules/mobility/project/ui/resources/mobile-project.png",
149
    sharedNamespace=J2MEProjectType.PROJECT_CONFIGURATION_NAMESPACE,
150
    privateNamespace=J2MEProjectType.PRIVATE_CONFIGURATION_NAMESPACE
151
)
146
public final class J2MEProject implements Project, AntProjectListener {
152
public final class J2MEProject implements Project, AntProjectListener {
147
    final Icon J2ME_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage(
153
    final Icon J2ME_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage(
148
            "org/netbeans/modules/mobility/project/ui/resources/mobile-project.png" )); // NOI18N
154
            "org/netbeans/modules/mobility/project/ui/resources/mobile-project.png" )); // NOI18N
 Lines 396-402    Link Here 
396
    }
402
    }
397
403
398
    
404
    
399
    J2MEProject(AntProjectHelper helper) {
405
    public J2MEProject(AntProjectHelper helper) {
400
        rp = new RequestProcessor ("RP for " +
406
        rp = new RequestProcessor ("RP for " +
401
                helper.getProjectDirectory().getPath(), 2, true);
407
                helper.getProjectDirectory().getPath(), 2, true);
402
        this.helper = helper;
408
        this.helper = helper;
(-)mobility.project/src/org/netbeans/modules/mobility/project/J2MEProjectType.java (-26 / +2 lines)
 Lines 40-76    Link Here 
40
 */
40
 */
41
41
42
package org.netbeans.modules.mobility.project;
42
package org.netbeans.modules.mobility.project;
43
import org.netbeans.api.project.Project;
44
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
45
import org.netbeans.spi.project.support.ant.AntProjectHelper;
46
47
/**
43
/**
48
 * Factory for simple J2ME projects.
44
 * Factory for simple J2ME projects.
49
 * @author Jesse Glick, Adam Sotona
45
 * @author Jesse Glick, Adam Sotona
50
 */
46
 */
51
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class, position=100)
47
public final class J2MEProjectType {
52
public final class J2MEProjectType implements AntBasedProjectType {
53
    
48
    
54
    public static final String TYPE = "org.netbeans.modules.kjava.j2meproject";  //NOI18N
49
    public static final String TYPE = "org.netbeans.modules.kjava.j2meproject";  //NOI18N
55
    private static final String PROJECT_CONFIGURATION_NAME = "data";  //NOI18N
56
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2me-project";  //NOI18N
50
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2me-project";  //NOI18N
57
    private static final String PRIVATE_CONFIGURATION_NAME = "data";  //NOI18N
51
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2me-project-private";  //NOI18N
58
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2me-project-private";  //NOI18N
59
    
60
    public String getType() {
61
        return TYPE;
62
    }
63
    
64
    public Project createProject(final AntProjectHelper helper) {
65
        return new J2MEProject(helper);
66
    }
67
    
68
    public String getPrimaryConfigurationDataElementName(final boolean shared) {
69
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
70
    }
71
    
72
    public String getPrimaryConfigurationDataElementNamespace(final boolean shared) {
73
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
74
    }
75
    
76
}
52
}
(-)php.project/nbproject/project.xml (-1 / +1 lines)
 Lines 141-147    Link Here 
141
                    <compile-dependency/>
141
                    <compile-dependency/>
142
                    <run-dependency>
142
                    <run-dependency>
143
                        <release-version>1</release-version>
143
                        <release-version>1</release-version>
144
                        <specification-version>1.21</specification-version>
144
                        <specification-version>1.30</specification-version>
145
                    </run-dependency>
145
                    </run-dependency>
146
                </dependency>
146
                </dependency>
147
                <dependency>
147
                <dependency>
(-)php.project/src/org/netbeans/modules/php/project/PhpProject.java (-1 / +8 lines)
 Lines 61-66    Link Here 
61
import org.netbeans.modules.php.project.ui.customizer.CustomizerProviderImpl;
61
import org.netbeans.modules.php.project.ui.customizer.CustomizerProviderImpl;
62
import org.netbeans.modules.php.project.ui.customizer.PhpProjectProperties;
62
import org.netbeans.modules.php.project.ui.customizer.PhpProjectProperties;
63
import org.netbeans.spi.project.AuxiliaryConfiguration;
63
import org.netbeans.spi.project.AuxiliaryConfiguration;
64
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
64
import org.netbeans.spi.project.support.ant.AntProjectHelper;
65
import org.netbeans.spi.project.support.ant.AntProjectHelper;
65
import org.netbeans.spi.project.support.ant.FilterPropertyProvider;
66
import org.netbeans.spi.project.support.ant.FilterPropertyProvider;
66
import org.netbeans.spi.project.support.ant.ProjectXmlSavedHook;
67
import org.netbeans.spi.project.support.ant.ProjectXmlSavedHook;
 Lines 89-94    Link Here 
89
/**
90
/**
90
 * @author ads, Tomas Mysik
91
 * @author ads, Tomas Mysik
91
 */
92
 */
93
@AntBasedProjectRegistration(
94
    type=PhpProjectType.TYPE,
95
    iconResource="org/netbeans/modules/php/project/ui/resources/phpProject.png",
96
    sharedNamespace=PhpProjectType.PROJECT_CONFIGURATION_NAMESPACE,
97
    privateNamespace=PhpProjectType.PRIVATE_CONFIGURATION_NAMESPACE
98
)
92
public class PhpProject implements Project {
99
public class PhpProject implements Project {
93
100
94
    public static final String USG_LOGGER_NAME = "org.netbeans.ui.metrics.php"; //NOI18N
101
    public static final String USG_LOGGER_NAME = "org.netbeans.ui.metrics.php"; //NOI18N
 Lines 112-118    Link Here 
112
    // @GuardedBy(this)
119
    // @GuardedBy(this)
113
    private FileObject seleniumDirectory;
120
    private FileObject seleniumDirectory;
114
121
115
    PhpProject(AntProjectHelper helper) {
122
    public PhpProject(AntProjectHelper helper) {
116
        assert helper != null;
123
        assert helper != null;
117
124
118
        this.helper = helper;
125
        this.helper = helper;
(-)php.project/src/org/netbeans/modules/php/project/PhpProjectType.java (-36 / +3 lines)
 Lines 40-85    Link Here 
40
 */
40
 */
41
package org.netbeans.modules.php.project;
41
package org.netbeans.modules.php.project;
42
42
43
import java.io.IOException;
44
45
import org.netbeans.api.project.Project;
46
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
47
import org.netbeans.spi.project.support.ant.AntProjectHelper;
48
49
50
/**
43
/**
51
 * @author ads
44
 * @author ads
52
 */
45
 */
53
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
46
public final class PhpProjectType {
54
public final class PhpProjectType implements AntBasedProjectType {
55
47
56
    public static final String TYPE = PhpProjectType.class.getPackage().getName();
48
    public static final String TYPE = "org.netbeans.modules.php.project"; // NOI18N
57
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/php-project/1"; // NOI18N
49
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/php-project/1"; // NOI18N
58
    private static final String PROJECT_CONFIGURATION_NAME = "data"; // NOI18N
50
    static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/php-project-private/1"; // NOI18N
59
51
60
    private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/php-project-private/1"; // NOI18N
61
    private static final String PRIVATE_CONFIGURATION_NAME = "data"; // NOI18N
62
63
    public Project createProject(AntProjectHelper helper) throws IOException {
64
        assert helper != null;
65
        return new PhpProject(helper);
66
    }
67
68
    public String getPrimaryConfigurationDataElementName( boolean shared ) {
69
        /*
70
         * Copied from MakeProjectType.
71
         */
72
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
73
    }
74
75
    public String getPrimaryConfigurationDataElementNamespace( boolean shared ) {
76
        /*
77
         * Copied from MakeProjectType.
78
         */
79
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
80
    }
81
82
    public String getType() {
83
        return TYPE;
84
    }
85
}
52
}
(-)project.ant/apichanges.xml (-10 / +10 lines)
 Lines 105-126    Link Here 
105
105
106
    <changes>
106
    <changes>
107
        
107
        
108
        <change id="antbasedprojecttype2">
108
        <change id="antbasedprojectregistration">
109
            <api name="general"/>
109
            <api name="general"/>
110
            <summary>Provide project icon without actually loading the project type</summary>
110
            <summary>Register Ant based projects with @annotation</summary>
111
            <version major="1" minor="28"/>
111
            <version major="1" minor="30"/>
112
            <date day="13" month="1" year="2009"/>
112
            <date day="4" month="2" year="2009"/>
113
            <author login="mkleint"/>
113
            <author login="jtulach"/>
114
            <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
114
            <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
115
            <description>
115
            <description>
116
                <p>
116
                <p>
117
                  Introducing <code>AntBasedProjectType2</code> that extends <code>AntBasedProjectType</code>
117
                  Introducing <code>AntBasedProjectRegistration</code> to
118
                  and adds <code>geticon()</code> method to allow showing the icon without actually loading the
118
                  simplify registering Ant based projects. Just write the
119
                  project. Related to <code>org.netbeans.spi.project.ProjectFactory2</code> changes in the Project API module.
119
                  project class and annotate it.
120
                </p>
120
                </p>
121
            </description>
121
            </description>
122
            <class package="org.netbeans.spi.project.support.ant" name="AntBasedProjectType2"/>
122
            <class package="org.netbeans.spi.project.support.ant" name="AntBasedProjectRegistration"/>
123
            <issue number="153923"/>
123
            <issue number="153655"/>
124
        </change>
124
        </change>
125
        
125
        
126
        <change id="SourcesHelper-minimalSubfolders">
126
        <change id="SourcesHelper-minimalSubfolders">
(-)project.ant/manifest.mf (-1 / +1 lines)
 Lines 1-6    Link Here 
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.project.ant/1
2
OpenIDE-Module: org.netbeans.modules.project.ant/1
3
OpenIDE-Module-Specification-Version: 1.28
3
OpenIDE-Module-Specification-Version: 1.30
4
OpenIDE-Module-Layer: org/netbeans/modules/project/ant/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/project/ant/resources/mf-layer.xml
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bundle.properties
6
OpenIDE-Module-Install: org/netbeans/modules/project/ant/AntProjectModule.class
6
OpenIDE-Module-Install: org/netbeans/modules/project/ant/AntProjectModule.class
(-)project.ant/nbproject/project.properties (+1 lines)
 Lines 46-51    Link Here 
46
46
47
javac.compilerargs=-Xlint -Xlint:-serial
47
javac.compilerargs=-Xlint -Xlint:-serial
48
javac.source=1.5
48
javac.source=1.5
49
cp.extra=${nb_all}/apisupport.harness/external/openjdk-javac-6-b12.jar
49
javadoc.arch=${basedir}/arch.xml
50
javadoc.arch=${basedir}/arch.xml
50
javadoc.apichanges=${basedir}/apichanges.xml
51
javadoc.apichanges=${basedir}/apichanges.xml
51
52
(-)project.ant/src/org/netbeans/modules/project/ant/AntBasedProjectFactorySingleton.java (-4 / +8 lines)
 Lines 69-75    Link Here 
69
import org.netbeans.spi.project.ProjectFactory2;
69
import org.netbeans.spi.project.ProjectFactory2;
70
import org.netbeans.spi.project.ProjectState;
70
import org.netbeans.spi.project.ProjectState;
71
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
71
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
72
import org.netbeans.spi.project.support.ant.AntBasedProjectType2;
73
import org.netbeans.spi.project.support.ant.AntProjectHelper;
72
import org.netbeans.spi.project.support.ant.AntProjectHelper;
74
import org.openide.filesystems.FileObject;
73
import org.openide.filesystems.FileObject;
75
import org.openide.filesystems.FileUtil;
74
import org.openide.filesystems.FileUtil;
 Lines 187-194    Link Here 
187
                    if (type != null) {
186
                    if (type != null) {
188
                        AntBasedProjectType provider = findAntBasedProjectType(type);
187
                        AntBasedProjectType provider = findAntBasedProjectType(type);
189
                        if (provider != null) {
188
                        if (provider != null) {
190
                            if (provider instanceof AntBasedProjectType2) {
189
                            if (provider instanceof AntBasedGenericType) {
191
                                return new ProjectManager.Result(((AntBasedProjectType2)provider).getIcon());
190
                                return new ProjectManager.Result(((AntBasedGenericType)provider).getIcon());
192
                            } else {
191
                            } else {
193
                                //put special icon?
192
                                //put special icon?
194
                                return new ProjectManager.Result(null);
193
                                return new ProjectManager.Result(null);
 Lines 385-389    Link Here 
385
        }
384
        }
386
        assert HELPER_CALLBACK != null;
385
        assert HELPER_CALLBACK != null;
387
    }
386
    }
388
    
387
388
    public static AntBasedProjectType create(Map map) {
389
        return new AntBasedGenericType(map);
390
    }
391
392
389
}
393
}
(-)project.ant/test/unit/src/org/netbeans/spi/project/support/ant/AntBasedTestUtil.java (-2 / +2 lines)
 Lines 157-170    Link Here 
157
        
157
        
158
    }
158
    }
159
    
159
    
160
    private static final class TestAntBasedProject implements Project {
160
    public static class TestAntBasedProject implements Project {
161
        
161
        
162
        private final AntProjectHelper helper;
162
        private final AntProjectHelper helper;
163
        private final ReferenceHelper refHelper;
163
        private final ReferenceHelper refHelper;
164
        private final GeneratedFilesHelper genFilesHelper;
164
        private final GeneratedFilesHelper genFilesHelper;
165
        private final Lookup l;
165
        private final Lookup l;
166
        
166
        
167
        TestAntBasedProject(AntProjectHelper helper, AntBuildExtenderImplementation ext) throws IOException {
167
        protected TestAntBasedProject(AntProjectHelper helper, AntBuildExtenderImplementation ext) throws IOException {
168
            if (helper.getProjectDirectory().getFileObject("nbproject/broken") != null) {
168
            if (helper.getProjectDirectory().getFileObject("nbproject/broken") != null) {
169
                throw new IOException("broken");
169
                throw new IOException("broken");
170
            }
170
            }
(-)sql.project/nbproject/project.xml (-1 / +1 lines)
 Lines 115-121    Link Here 
115
                    <compile-dependency/>
115
                    <compile-dependency/>
116
                    <run-dependency>
116
                    <run-dependency>
117
                        <release-version>1</release-version>
117
                        <release-version>1</release-version>
118
                        <specification-version>1.12.21</specification-version>
118
                        <specification-version>1.30</specification-version>
119
                    </run-dependency>
119
                    </run-dependency>
120
                </dependency>
120
                </dependency>
121
                <dependency>
121
                <dependency>
(-)sql.project/src/org/netbeans/modules/sql/project/SQLproProject.java (-2 / +7 lines)
 Lines 44-50    Link Here 
44
import org.netbeans.modules.compapp.projects.base.ui.IcanproCustomizerProvider;
44
import org.netbeans.modules.compapp.projects.base.ui.IcanproCustomizerProvider;
45
import org.netbeans.modules.compapp.projects.base.ui.customizer.IcanproProjectProperties;
45
import org.netbeans.modules.compapp.projects.base.ui.customizer.IcanproProjectProperties;
46
import org.netbeans.modules.compapp.projects.base.queries.IcanproProjectEncodingQueryImpl;
46
import org.netbeans.modules.compapp.projects.base.queries.IcanproProjectEncodingQueryImpl;
47
import org.netbeans.modules.sql.project.SQLproConstants;
48
import org.netbeans.modules.sql.project.ui.SQLproLogicalViewProvider;
47
import org.netbeans.modules.sql.project.ui.SQLproLogicalViewProvider;
49
import java.beans.PropertyChangeListener;
48
import java.beans.PropertyChangeListener;
50
import java.beans.PropertyChangeSupport;
49
import java.beans.PropertyChangeSupport;
 Lines 80-86    Link Here 
80
import org.openide.util.ImageUtilities;
79
import org.openide.util.ImageUtilities;
81
import org.openide.util.Lookup;
80
import org.openide.util.Lookup;
82
import org.openide.util.Mutex;
81
import org.openide.util.Mutex;
83
import org.openide.util.Utilities;
84
import org.openide.util.lookup.Lookups;
82
import org.openide.util.lookup.Lookups;
85
import org.w3c.dom.Element;
83
import org.w3c.dom.Element;
86
import org.w3c.dom.Node;
84
import org.w3c.dom.Node;
 Lines 91-96    Link Here 
91
import java.nio.charset.UnsupportedCharsetException;
89
import java.nio.charset.UnsupportedCharsetException;
92
import java.util.logging.Logger;
90
import java.util.logging.Logger;
93
import org.netbeans.api.queries.FileEncodingQuery;
91
import org.netbeans.api.queries.FileEncodingQuery;
92
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
94
93
95
94
96
95
 Lines 98-103    Link Here 
98
 * Represents one sql module project
97
 * Represents one sql module project
99
 * @author Chris Webster
98
 * @author Chris Webster
100
 */
99
 */
100
@AntBasedProjectRegistration(
101
    type=SQLproProjectType.TYPE,
102
    iconResource="org/netbeans/modules/sql/project/ui/resources/sqlproProjectIcon.gif",
103
    sharedNamespace=SQLproProjectType.PROJECT_CONFIGURATION_NAMESPACE,
104
    privateNamespace=SQLproProjectType.PRIVATE_CONFIGURATION_NAMESPACE
105
)
101
public final class SQLproProject implements Project, AntProjectListener {
106
public final class SQLproProject implements Project, AntProjectListener {
102
107
103
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/sql/project/ui/resources/sqlproProjectIcon.gif")); // NOI18N
108
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/sql/project/ui/resources/sqlproProjectIcon.gif")); // NOI18N
(-)sql.project/src/org/netbeans/modules/sql/project/SQLproProjectType.java (-31 / +1 lines)
 Lines 32-75    Link Here 
32
32
33
package org.netbeans.modules.sql.project;
33
package org.netbeans.modules.sql.project;
34
34
35
import java.io.IOException;
36
import org.netbeans.api.project.Project;
37
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
38
import org.netbeans.spi.project.support.ant.AntProjectHelper;
39
40
/**
35
/**
41
 * Factory for EJB Module projects
36
 * Factory for EJB Module projects
42
 * @author Chris Webster
37
 * @author Chris Webster
43
 */
38
 */
44
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
39
public class SQLproProjectType {
45
public class SQLproProjectType implements AntBasedProjectType {
46
    public static final String TYPE = "org.netbeans.modules.sql.project";
40
    public static final String TYPE = "org.netbeans.modules.sql.project";
47
    public static final String PROJECT_CONFIGURATION_NAME = "data";
41
    public static final String PROJECT_CONFIGURATION_NAME = "data";
48
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-sqlpro/1";
42
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-sqlpro/1";
49
    public static final String PRIVATE_CONFIGURATION_NAME = "data";
43
    public static final String PRIVATE_CONFIGURATION_NAME = "data";
50
    public static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-sqlpro-private/1";
44
    public static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-sqlpro-private/1";
51
    
52
    
53
    public SQLproProjectType() {
54
        int i = 0;
55
    }
56
    
57
    public String getType() {
58
        return TYPE;
59
    }
60
    
61
    public Project createProject(AntProjectHelper helper) throws IOException {
62
        if (null == helper)
63
            throw new IllegalArgumentException("helper");
64
        return new SQLproProject(helper);
65
    }
66
67
    public String getPrimaryConfigurationDataElementName(boolean shared) {
68
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
69
    }
70
    
71
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
72
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
73
    }
74
    
75
}
45
}
(-)web.project/nbproject/project.xml (-1 / +1 lines)
 Lines 275-281    Link Here 
275
                    <compile-dependency/>
275
                    <compile-dependency/>
276
                    <run-dependency>
276
                    <run-dependency>
277
                        <release-version>1</release-version>
277
                        <release-version>1</release-version>
278
                        <specification-version>1.25</specification-version>
278
                        <specification-version>1.30</specification-version>
279
                    </run-dependency>
279
                    </run-dependency>
280
                </dependency>
280
                </dependency>
281
                <dependency>
281
                <dependency>
(-)web.project/src/org/netbeans/modules/web/project/WebProjectType.java (-21 / +13 lines)
 Lines 43-58    Link Here 
43
43
44
import java.io.IOException;
44
import java.io.IOException;
45
import java.util.Collection;
45
import java.util.Collection;
46
import javax.swing.Icon;
47
import org.netbeans.api.project.Project;
46
import org.netbeans.api.project.Project;
48
import org.netbeans.modules.web.project.spi.WebProjectImplementationFactory;
47
import org.netbeans.modules.web.project.spi.WebProjectImplementationFactory;
49
import org.netbeans.spi.project.support.ant.AntBasedProjectType2;
48
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
50
import org.netbeans.spi.project.support.ant.AntProjectHelper;
49
import org.netbeans.spi.project.support.ant.AntProjectHelper;
51
import org.openide.util.ImageUtilities;
52
import org.openide.util.Lookup;
50
import org.openide.util.Lookup;
53
51
54
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
52
public final class WebProjectType {
55
public final class WebProjectType implements AntBasedProjectType2 {
56
53
57
    public static final String TYPE = "org.netbeans.modules.web.project";
54
    public static final String TYPE = "org.netbeans.modules.web.project";
58
    private static final String PROJECT_CONFIGURATION_NAME = "data";
55
    private static final String PROJECT_CONFIGURATION_NAME = "data";
 Lines 66-78    Link Here 
66
            "http://www.netbeans.org/ns/web-project/3"};
63
            "http://www.netbeans.org/ns/web-project/3"};
67
64
68
    /** Do nothing, just a service. */
65
    /** Do nothing, just a service. */
69
    public WebProjectType() {}
66
    private WebProjectType() {}
70
    
67
    
71
    public String getType() {
68
    public String getType() {
72
        return TYPE;
69
        return TYPE;
73
    }
70
    }
74
    
71
    @AntBasedProjectRegistration(
75
    public Project createProject(AntProjectHelper helper) throws IOException {
72
        iconResource="org/netbeans/modules/web/project/ui/resources/webProjectIcon.gif", // NOI18N
73
        type=TYPE,
74
        sharedName=PROJECT_CONFIGURATION_NAME,
75
        sharedNamespace=PROJECT_CONFIGURATION_NAMESPACE,
76
        privateName=PRIVATE_CONFIGURATION_NAME,
77
        privateNamespace=PRIVATE_CONFIGURATION_NAMESPACE
78
    )
79
    public static Project createProject(AntProjectHelper helper) throws IOException {
76
        for(WebProjectImplementationFactory factory : getProjectFactories()) {
80
        for(WebProjectImplementationFactory factory : getProjectFactories()) {
77
            if (factory.acceptProject(helper)) {
81
            if (factory.acceptProject(helper)) {
78
                //delegate project completely to another implementation
82
                //delegate project completely to another implementation
 Lines 82-100    Link Here 
82
        return new WebProject(helper);
86
        return new WebProject(helper);
83
    }
87
    }
84
88
85
    public String getPrimaryConfigurationDataElementName(boolean shared) {
89
    private static Collection<? extends WebProjectImplementationFactory> getProjectFactories() {
86
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
87
    }
88
    
89
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
90
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
91
    }
92
93
    private Collection<? extends WebProjectImplementationFactory> getProjectFactories() {
94
        return Lookup.getDefault().lookupAll(WebProjectImplementationFactory.class);
90
        return Lookup.getDefault().lookupAll(WebProjectImplementationFactory.class);
95
    }
91
    }
96
97
    public Icon getIcon() {
98
        return ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/web/project/ui/resources/webProjectIcon.gif", true));
99
    }
100
}
92
}
(-)xslt.project/nbproject/project.xml (-1 / +1 lines)
 Lines 90-96    Link Here 
90
                    <compile-dependency/>
90
                    <compile-dependency/>
91
                    <run-dependency>
91
                    <run-dependency>
92
                        <release-version>1</release-version>
92
                        <release-version>1</release-version>
93
                        <specification-version>1.12.22</specification-version>
93
                        <specification-version>1.30</specification-version>
94
                    </run-dependency>
94
                    </run-dependency>
95
                </dependency>
95
                </dependency>
96
                <dependency>
96
                <dependency>
(-)xslt.project/src/org/netbeans/modules/xslt/project/XsltproProject.java (-1 / +7 lines)
 Lines 51-56    Link Here 
51
import org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport;
51
import org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport;
52
import org.netbeans.spi.project.AuxiliaryConfiguration;
52
import org.netbeans.spi.project.AuxiliaryConfiguration;
53
import org.netbeans.spi.project.SubprojectProvider;
53
import org.netbeans.spi.project.SubprojectProvider;
54
import org.netbeans.spi.project.support.ant.AntBasedProjectRegistration;
54
import org.netbeans.spi.project.support.ant.AntProjectEvent;
55
import org.netbeans.spi.project.support.ant.AntProjectEvent;
55
import org.netbeans.spi.project.support.ant.AntProjectHelper;
56
import org.netbeans.spi.project.support.ant.AntProjectHelper;
56
import org.netbeans.spi.project.support.ant.AntProjectListener;
57
import org.netbeans.spi.project.support.ant.AntProjectListener;
 Lines 73-79    Link Here 
73
import org.openide.util.ImageUtilities;
74
import org.openide.util.ImageUtilities;
74
import org.openide.util.Lookup;
75
import org.openide.util.Lookup;
75
import org.openide.util.Mutex;
76
import org.openide.util.Mutex;
76
import org.openide.util.Utilities;
77
import org.openide.util.lookup.Lookups;
77
import org.openide.util.lookup.Lookups;
78
import org.w3c.dom.Element;
78
import org.w3c.dom.Element;
79
import org.w3c.dom.Node;
79
import org.w3c.dom.Node;
 Lines 86-91    Link Here 
86
 * @author Vitaly Bychkov
86
 * @author Vitaly Bychkov
87
 * @version 1.0
87
 * @version 1.0
88
 */
88
 */
89
@AntBasedProjectRegistration(
90
    type=XsltproProjectType.TYPE,
91
    iconResource=XSLT_PROJECT_ICON,
92
    sharedNamespace=XsltproProjectType.PROJECT_CONFIGURATION_NAMESPACE,
93
    privateNamespace=XsltproProjectType.PRIVATE_CONFIGURATION_NAMESPACE
94
)
89
public class XsltproProject implements Project, AntProjectListener {
95
public class XsltproProject implements Project, AntProjectListener {
90
    
96
    
91
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage(XSLT_PROJECT_ICON)); // NOI18N
97
    private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage(XSLT_PROJECT_ICON)); // NOI18N
(-)xslt.project/src/org/netbeans/modules/xslt/project/XsltproProjectType.java (-30 / +1 lines)
 Lines 18-62    Link Here 
18
 */
18
 */
19
package org.netbeans.modules.xslt.project;
19
package org.netbeans.modules.xslt.project;
20
20
21
import java.io.IOException;
22
import org.netbeans.api.project.Project;
23
import org.netbeans.spi.project.support.ant.AntBasedProjectType;
24
import org.netbeans.spi.project.support.ant.AntProjectHelper;
25
26
/**
21
/**
27
 * Factory for EJB Module projects
22
 * Factory for EJB Module projects
28
 * @author Chris Webster
23
 * @author Chris Webster
29
 * @author Vitaly Bychkov
24
 * @author Vitaly Bychkov
30
 * @version 1.0
25
 * @version 1.0
31
 */
26
 */
32
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.project.support.ant.AntBasedProjectType.class)
27
public class XsltproProjectType {
33
public class XsltproProjectType implements AntBasedProjectType {
34
    public static final String TYPE = "org.netbeans.modules.xslt.project";
28
    public static final String TYPE = "org.netbeans.modules.xslt.project";
35
    public static final String PROJECT_CONFIGURATION_NAME = "data";
29
    public static final String PROJECT_CONFIGURATION_NAME = "data";
36
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-xsltpro/1";
30
    public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-xsltpro/1";
37
    public static final String PRIVATE_CONFIGURATION_NAME = "data";
31
    public static final String PRIVATE_CONFIGURATION_NAME = "data";
38
    public static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-xsltpro-private/1";
32
    public static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-xsltpro-private/1";
39
    
40
    public XsltproProjectType() {
41
    }
42
43
    public String getType() {
44
        return TYPE;
45
    }
46
47
    public Project createProject(AntProjectHelper helper) throws IOException {
48
        if (helper == null) {
49
            throw new IllegalArgumentException("AntProjectHelper shouldn't be null");
50
        }
51
        return new XsltproProject(helper);
52
    }
53
54
    public String getPrimaryConfigurationDataElementName(boolean shared) {
55
        return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
56
    }
57
58
    public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
59
        return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
60
    }
61
    
62
}
33
}

Return to bug 153655
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo