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

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

(-)src/org/netbeans/modules/j2ee/weblogic9/Bundle.properties (-2 / +2 lines)
Lines 17-24 Link Here
17
# Microsystems, Inc. All Rights Reserved.
17
# Microsystems, Inc. All Rights Reserved.
18
#
18
#
19
19
20
TXT_displayName=BEA WebLogic Server 9
20
TXT_displayName=BEA WebLogic Server
21
TXT_productVersion=9
21
TXT_productVersion=9/10
22
22
23
ERR_illegalState=This operation is not possible on a disconnected deployment manager
23
ERR_illegalState=This operation is not possible on a disconnected deployment manager
24
24
(-)src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java (-1 / +1 lines)
Lines 247-253 Link Here
247
                String level = releaseNodeAttributes.getNamedItem("level").getNodeValue(); // NOI18N
247
                String level = releaseNodeAttributes.getNamedItem("level").getNodeValue(); // NOI18N
248
                String installDir = releaseNodeAttributes.getNamedItem("InstallDir").getNodeValue(); // NOI18N
248
                String installDir = releaseNodeAttributes.getNamedItem("InstallDir").getNodeValue(); // NOI18N
249
                String installDirCanonical = new File(installDir).getCanonicalPath();
249
                String installDirCanonical = new File(installDir).getCanonicalPath();
250
                if (level != null && level.startsWith("9.") && installDirCanonical.equals(serverRoot.getCanonicalPath())) {
250
                if (level != null && level.startsWith("9.") || level.startsWith("10.") && installDirCanonical.equals(serverRoot.getCanonicalPath())) {
251
                    return true;
251
                    return true;
252
                }
252
                }
253
            }
253
            }
(-)src/org/netbeans/modules/j2ee/weblogic9/config/WarDeploymentConfiguration.java (-1 / +1 lines)
Lines 1-4 Link Here
1
/*
1
 /*
2
 * The contents of this file are subject to the terms of the Common Development
2
 * The contents of this file are subject to the terms of the Common Development
3
 * and Distribution License (the License). You may not use this file except in
3
 * and Distribution License (the License). You may not use this file except in
4
 * compliance with the License.
4
 * compliance with the License.
(-)src/org/netbeans/modules/j2ee/weblogic9/j2ee/WLJ2eePlatformFactory.java (-4 / +12 lines)
Lines 37-42 Link Here
37
import org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformImpl;
37
import org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformImpl;
38
38
39
import org.netbeans.modules.j2ee.weblogic9.*;
39
import org.netbeans.modules.j2ee.weblogic9.*;
40
import org.netbeans.modules.j2ee.weblogic9.util.Util;
40
41
41
/**
42
/**
42
 * A sub-class of the J2eePlatformFactory that is set up to return the 
43
 * A sub-class of the J2eePlatformFactory that is set up to return the 
Lines 63-72 Link Here
63
//            MODULE_TYPES.add(J2eeModule.CLIENT);
64
//            MODULE_TYPES.add(J2eeModule.CLIENT);
64
        }
65
        }
65
66
66
        private static final Set SPEC_VERSIONS = new HashSet();
67
        private final Set SPEC_VERSIONS = new HashSet();
67
        static {
68
            SPEC_VERSIONS.add(J2eeModule.J2EE_14);
69
        }
70
        
68
        
71
//        private String platformRoot = WLPluginProperties.getInstance().getInstallLocation();
69
//        private String platformRoot = WLPluginProperties.getInstance().getInstallLocation();
72
        private String platformRoot;
70
        private String platformRoot;
Lines 87-92 Link Here
87
        
85
        
88
        public J2eePlatformImplImpl(WLDeploymentManager dm) {
86
        public J2eePlatformImplImpl(WLDeploymentManager dm) {
89
            this.dm = dm;
87
            this.dm = dm;
88
            
89
            // Allow J2EE 1.4 Projects
90
            SPEC_VERSIONS.add(J2eeModule.J2EE_14);
91
            
92
            // Check for WebLogic Server 10x to allow Java EE 5 Projects
93
            String version = Util.getWeblogicDomainVersion(dm.getInstanceProperties().getProperty(WLPluginProperties.DOMAIN_ROOT_ATTR));
94
            
95
            if (version != null && version.contains("10"))
96
                SPEC_VERSIONS.add(J2eeModule.JAVA_EE_5);
90
        }
97
        }
91
        
98
        
92
        public boolean isToolSupported(String toolName) {
99
        public boolean isToolSupported(String toolName) {
Lines 151-156 Link Here
151
            try {
158
            try {
152
                List list = new ArrayList();
159
                List list = new ArrayList();
153
                list.add(fileToUrl(new File(getPlatformRoot(), "server/lib/weblogic.jar"))); // NOI18N
160
                list.add(fileToUrl(new File(getPlatformRoot(), "server/lib/weblogic.jar"))); // NOI18N
161
                list.add(fileToUrl(new File(getPlatformRoot(), "server/lib/api.jar"))); // NOI18N
154
                
162
                
155
                library.setContent(J2eeLibraryTypeProvider.
163
                library.setContent(J2eeLibraryTypeProvider.
156
                        VOLUME_TYPE_CLASSPATH, list);
164
                        VOLUME_TYPE_CLASSPATH, list);
(-)src/org/netbeans/modules/j2ee/weblogic9/resources/Bundle.properties (-3 / +4 lines)
Lines 17-23 Link Here
17
# Microsystems, Inc. All Rights Reserved.
17
# Microsystems, Inc. All Rights Reserved.
18
#
18
#
19
19
20
OpenIDE-Module-Name=BEA WebLogic Server 9
20
OpenIDE-Module-Name=BEA WebLogic Server
21
OpenIDE-Module-Display-Category=Java EE
21
OpenIDE-Module-Display-Category=Java EE
22
OpenIDE-Module-Short-Description=Plugin for BEA WebLogic Server 9
22
OpenIDE-Module-Short-Description=Plugin for BEA WebLogic Server
23
OpenIDE-Module-Long-Description=The plugin enables J2EE development modules to configure, deploy, and debug J2EE components on BEA WebLogic Server 9.
23
OpenIDE-Module-Long-Description=\
24
    The plugin enables J2EE development modules to configure, deploy, and debug J2EE components on BEA WebLogic Server
(-)src/org/netbeans/modules/j2ee/weblogic9/ui/wizard/Bundle.properties (-1 / +1 lines)
Lines 18-24 Link Here
18
#
18
#
19
19
20
ERR_INVALID_JDK=IDE must run on JDK 1.5.
20
ERR_INVALID_JDK=IDE must run on JDK 1.5.
21
ERR_INVALID_SERVER_VERSION=Please enter a valid BEA WebLogic Server 9 installation directory.
21
ERR_INVALID_SERVER_VERSION=Please enter a valid BEA WebLogic Server 9 or 10 installation directory.
22
ERR_INVALID_SERVER_ROOT=The entered installation directory is not properly structured.
22
ERR_INVALID_SERVER_ROOT=The entered installation directory is not properly structured.
23
DOMAIN_LIST_NOT_FOUND=Domain list file {0} was not found.
23
DOMAIN_LIST_NOT_FOUND=Domain list file {0} was not found.
24
LBL_SERVER_LOCATION=Server Location:
24
LBL_SERVER_LOCATION=Server Location:
(-)src/org/netbeans/modules/j2ee/weblogic9/util/Util.java (+68 lines)
Added Link Here
1
/*
2
 * The contents of this file are subject to the terms of the Common Development
3
 * and Distribution License (the License). You may not use this file except in
4
 * compliance with the License.
5
 *
6
 * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7
 * or http://www.netbeans.org/cddl.txt.
8
 *
9
 * When distributing Covered Code, include this CDDL Header Notice in each file
10
 * and include the License file at http://www.netbeans.org/cddl.txt.
11
 * If applicable, add the following below the CDDL Header, with the fields
12
 * enclosed by brackets [] replaced by your own identifying information:
13
 * "Portions Copyrighted [year] [name of copyright owner]"
14
 *
15
 * To change this template, choose Tools | Template Manager
16
 * and open the template in the editor.
17
 */
18
19
package org.netbeans.modules.j2ee.weblogic9.util;
20
21
import java.io.File;
22
import java.io.FileInputStream;
23
import java.io.FileNotFoundException;
24
import java.io.IOException;
25
import org.openide.ErrorManager;
26
27
import org.openide.xml.XMLUtil;
28
import org.w3c.dom.Document;
29
import org.xml.sax.InputSource;
30
import org.xml.sax.SAXException;
31
32
/**
33
 * Helper class
34
 * 
35
 * @author Michal Mocnak
36
 */
37
public class Util {
38
    
39
    private static final String CONFIG_XML = "config/config.xml";
40
    
41
    private Util() {}
42
    
43
    public static String getWeblogicDomainVersion(String domainRoot) {
44
        // Domain config file
45
        File config = new File(domainRoot, CONFIG_XML);
46
        
47
        // Check if the file exists
48
        if (!config.exists())
49
            return null;
50
        
51
        try {
52
            InputSource source = new InputSource(new FileInputStream(config));
53
            Document d = XMLUtil.parse(source, false, false, null, null);
54
            
55
            // Retrieve domain version
56
            return d.getElementsByTagName("domain-version").item(0).getTextContent();
57
            
58
        } catch(FileNotFoundException e) {
59
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
60
        } catch(IOException e) {
61
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
62
        } catch(SAXException e) {
63
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
64
        }
65
        
66
        return null;
67
    }
68
}

Return to bug 99830