Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 291665
Collapse All | Expand All

(-)src/org/eclipse/rap/ui/internal/launch/RAPLaunchConfigValidator.java (-27 / +1 lines)
Lines 18-25 Link Here
18
18
19
import org.eclipse.core.runtime.*;
19
import org.eclipse.core.runtime.*;
20
import org.eclipse.debug.core.*;
20
import org.eclipse.debug.core.*;
21
import org.eclipse.pde.internal.launching.launcher.OSGiFrameworkManager;
21
import org.eclipse.pde.internal.ui.PDEPlugin;
22
import org.eclipse.pde.internal.ui.PDEPlugin;
22
import org.eclipse.pde.internal.ui.launcher.OSGiFrameworkManager;
23
import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
23
import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
24
24
25
25
Lines 36-44 Link Here
36
  private static final String RAP_LAUNCH_CONFIG_TYPE
36
  private static final String RAP_LAUNCH_CONFIG_TYPE
37
    = "org.eclipse.rap.ui.launch.RAPLauncher"; //$NON-NLS-1$
37
    = "org.eclipse.rap.ui.launch.RAPLauncher"; //$NON-NLS-1$
38
  
38
  
39
  private static final String EQUINOX_FRAMEWORK
40
    = "org.eclipse.pde.ui.EquinoxFramework"; //$NON-NLS-1$
41
42
  private static final String EMPTY = ""; //$NON-NLS-1$
39
  private static final String EMPTY = ""; //$NON-NLS-1$
43
40
44
41
Lines 57-63 Link Here
57
      addNonOKState( states, validateUniquePort() );
54
      addNonOKState( states, validateUniquePort() );
58
      addNonOKState( states, validateURL() );
55
      addNonOKState( states, validateURL() );
59
      addNonOKState( states, validateLogLevel() );
56
      addNonOKState( states, validateLogLevel() );
60
      addNonOKState( states, validateOSGiFramework() );
61
    } catch( CoreException e ) {
57
    } catch( CoreException e ) {
62
      String text
58
      String text
63
        = LaunchMessages.RAPLaunchConfigValidator_ErrorWhileValidating;
59
        = LaunchMessages.RAPLaunchConfigValidator_ErrorWhileValidating;
Lines 163-178 Link Here
163
    return result;
159
    return result;
164
  }
160
  }
165
  
161
  
166
  private IStatus validateOSGiFramework() throws CoreException {
167
    IStatus result = Status.OK_STATUS;
168
    String frameworkId = getOSGiFrameworkId();
169
    if( !EQUINOX_FRAMEWORK.equals( frameworkId ) ) {
170
      String msg = LaunchMessages.RAPLaunchConfigValidator_EquinoxOnly;
171
      result = createWarning( msg, WARN_OSGI_FRAMEWORK, null );
172
    }
173
    return result;
174
  }
175
176
  /////////////////////////
162
  /////////////////////////
177
  // Status creation helper
163
  // Status creation helper
178
164
Lines 215-230 Link Here
215
           && !config.getName().equals( otherConfig.getName() )
201
           && !config.getName().equals( otherConfig.getName() )
216
           && config.getPort() == otherConfig.getPort();
202
           && config.getPort() == otherConfig.getPort();
217
  }
203
  }
218
  
219
  ////////////////////////////////////////////
220
  // Helping methods for validateOSGiFramework
221
222
  private String getOSGiFrameworkId() throws CoreException {
223
    ILaunchConfiguration launchConfig = config.getUnderlyingLaunchConfig();
224
    OSGiFrameworkManager manager
225
      = PDEPlugin.getDefault().getOSGiFrameworkManager();
226
    String defaultFrameworkId = manager.getDefaultFramework();
227
    String attributeName = IPDELauncherConstants.OSGI_FRAMEWORK_ID;
228
    return launchConfig.getAttribute( attributeName, defaultFrameworkId );
229
  }
230
}
204
}
(-)src/org/eclipse/rap/ui/internal/launch/LaunchMessages.java (-1 / +2 lines)
Lines 37-43 Link Here
37
  public static String RAPLaunchDelegate_StartClientTaskName;
37
  public static String RAPLaunchDelegate_StartClientTaskName;
38
  public static String RAPLaunchDelegate_TerminatePreviousTaskName;
38
  public static String RAPLaunchDelegate_TerminatePreviousTaskName;
39
  public static String RAPLaunchDelegate_WaitForHTTPTaskName;
39
  public static String RAPLaunchDelegate_WaitForHTTPTaskName;
40
40
  public static String RAPLaunchDelegate_Error_NotAPlugin;
41
  
41
  public static String SelectionDialogUtil_Unknown;
42
  public static String SelectionDialogUtil_Unknown;
42
  public static String SelectionDialogUtil_UnknownProject;
43
  public static String SelectionDialogUtil_UnknownProject;
43
44
(-)src/org/eclipse/rap/ui/internal/launch/messages.properties (+2 lines)
Lines 31-36 Link Here
31
RAPLaunchDelegate_StartClientTaskName=Starting client application
31
RAPLaunchDelegate_StartClientTaskName=Starting client application
32
RAPLaunchDelegate_TerminatePreviousTaskName=Terminating previous launch
32
RAPLaunchDelegate_TerminatePreviousTaskName=Terminating previous launch
33
RAPLaunchDelegate_WaitForHTTPTaskName=Waiting for HTTP service
33
RAPLaunchDelegate_WaitForHTTPTaskName=Waiting for HTTP service
34
RAPLaunchDelegate_Error_NotAPlugin = Could not launch the JUnit plug-in tests because project ''{0}'' is not a plug-in project.
35
34
36
35
SelectionDialogUtil_Unknown=(unknown)
37
SelectionDialogUtil_Unknown=(unknown)
36
SelectionDialogUtil_UnknownProject=(unknown project)
38
SelectionDialogUtil_UnknownProject=(unknown project)
(-)src/org/eclipse/rap/ui/internal/launch/junit/RAPJUnitLaunchConfigurationDelegate.java (-2 / +1 lines)
Lines 22-28 Link Here
22
import org.eclipse.jdt.launching.IVMRunner;
22
import org.eclipse.jdt.launching.IVMRunner;
23
import org.eclipse.osgi.util.NLS;
23
import org.eclipse.osgi.util.NLS;
24
import org.eclipse.pde.core.plugin.*;
24
import org.eclipse.pde.core.plugin.*;
25
import org.eclipse.pde.internal.ui.PDEUIMessages;
26
import org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration;
25
import org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration;
27
import org.eclipse.rap.ui.internal.launch.LaunchMessages;
26
import org.eclipse.rap.ui.internal.launch.LaunchMessages;
28
import org.eclipse.rap.ui.internal.launch.RAPLaunchDelegate;
27
import org.eclipse.rap.ui.internal.launch.RAPLaunchDelegate;
Lines 157-163 Link Here
157
    IPluginModelBase model = PluginRegistry.findModel( project );
156
    IPluginModelBase model = PluginRegistry.findModel( project );
158
    if( model == null ) {
157
    if( model == null ) {
159
      String msg
158
      String msg
160
        = NLS.bind( PDEUIMessages.JUnitLaunchConfiguration_error_notaplugin,
159
        = NLS.bind( LaunchMessages.RAPLaunchDelegate_Error_NotAPlugin,
161
                    project.getName() );
160
                    project.getName() );
162
      abort( msg, null, IStatus.OK );
161
      abort( msg, null, IStatus.OK );
163
    }
162
    }

Return to bug 291665