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 345403
Collapse All | Expand All

(-)src/org/eclipse/rap/ui/internal/intro/target/InstallTargetDialog.java (-25 / +33 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2011 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2007, 2011 EclipseSource and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 19-25 Link Here
19
import org.eclipse.swt.events.SelectionEvent;
19
import org.eclipse.swt.events.SelectionEvent;
20
import org.eclipse.swt.graphics.Image;
20
import org.eclipse.swt.graphics.Image;
21
import org.eclipse.swt.graphics.Point;
21
import org.eclipse.swt.graphics.Point;
22
import org.eclipse.swt.layout.*;
22
import org.eclipse.swt.layout.GridData;
23
import org.eclipse.swt.layout.GridLayout;
23
import org.eclipse.swt.widgets.*;
24
import org.eclipse.swt.widgets.*;
24
25
25
public final class InstallTargetDialog extends TitleAreaDialog {
26
public final class InstallTargetDialog extends TitleAreaDialog {
Lines 37-43 Link Here
37
  private boolean shouldSwitchTarget = true;
38
  private boolean shouldSwitchTarget = true;
38
  private Image titleImage;
39
  private Image titleImage;
39
40
40
  public InstallTargetDialog( final Shell parentShell ) {
41
  public InstallTargetDialog( Shell parentShell ) {
41
    super( parentShell );
42
    super( parentShell );
42
    setShellStyle( SWT.TITLE | SWT.CLOSE | SWT.RESIZE );
43
    setShellStyle( SWT.TITLE | SWT.CLOSE | SWT.RESIZE );
43
    setHelpAvailable( false );
44
    setHelpAvailable( false );
Lines 63-74 Link Here
63
64
64
  protected Point getInitialSize() {
65
  protected Point getInitialSize() {
65
    Point initialSize = super.getInitialSize();
66
    Point initialSize = super.getInitialSize();
66
    return new Point( initialSize.x, initialSize.y - 160 );
67
    return new Point( initialSize.x, initialSize.y - 150 );
67
  }
68
  }
68
  
69
  
69
  protected Control createDialogArea( final Composite parent ) {
70
  protected Control createDialogArea( Composite parent ) {
70
    Composite result = ( Composite )super.createDialogArea( parent );
71
    Composite result = ( Composite )super.createDialogArea( parent );
71
    configureDialog();
72
    configureDialog();
73
    createTargetDescription( result );
72
    createTargetLocationArea( result );
74
    createTargetLocationArea( result );
73
    createSwitchTargetArea( result );
75
    createSwitchTargetArea( result );
74
    Dialog.applyDialogFont( result );
76
    Dialog.applyDialogFont( result );
Lines 96-126 Link Here
96
    setMessage( IntroMessages.InstallDialog_Message_selectLocation );
98
    setMessage( IntroMessages.InstallDialog_Message_selectLocation );
97
  }
99
  }
98
100
99
  private void createTargetLocationArea( final Composite parent ) {
101
  private void createTargetDescription( Composite parent ) {
102
    Composite container = new Composite( parent, SWT.NONE );
103
    container.setLayoutData( new GridData( SWT.FILL, SWT.TOP, true, false ) );
104
    container.setLayout( new GridLayout() );
105
    Label targetDescriptionLabel = new Label( container, SWT.WRAP );
106
    targetDescriptionLabel.setLayoutData( getLayoutDataForDescriptions() );
107
    targetDescriptionLabel.setText( IntroMessages.InstallTargetDialog_TargetDescriptionMsg );
108
  }
109
  
110
  private void createTargetLocationArea( Composite parent ) {
100
    Composite container = new Composite( parent, SWT.NONE );
111
    Composite container = new Composite( parent, SWT.NONE );
101
    container.setLayoutData( new GridData( SWT.FILL, SWT.TOP, true, false ) );
112
    container.setLayoutData( new GridData( SWT.FILL, SWT.TOP, true, false ) );
102
    container.setLayout( new GridLayout() );
113
    container.setLayout( new GridLayout() );
103
    Group targetSelectionGroup = new Group( container, SWT.NONE );
114
    Group targetSelectionGroup = new Group( container, SWT.NONE );
104
    targetSelectionGroup.setLayout( new GridLayout( 1, true ) );
115
    targetSelectionGroup.setLayout( new GridLayout( 1, true ) );
105
    targetSelectionGroup.setLayoutData( new GridData( SWT.FILL,
116
    targetSelectionGroup.setLayoutData( new GridData( SWT.FILL, SWT.TOP, true, false ) );
106
                                                      SWT.TOP,
117
    String targetVersionGroupTitle = IntroMessages.InstallTargetDialog_TargetVersionGroupTitle;
107
                                                      true,
108
                                                      false ) );
109
    String targetVersionGroupTitle 
110
      = IntroMessages.InstallTargetDialog_TargetVersionGroupTitle;
111
    targetSelectionGroup.setText( targetVersionGroupTitle );
118
    targetSelectionGroup.setText( targetVersionGroupTitle );
112
    createButtons( targetSelectionGroup );
119
    createButtons( targetSelectionGroup );
113
    Label warningLabel = new Label( targetSelectionGroup, SWT.NONE );
114
    warningLabel.setText( IntroMessages.InstallTargetDialog_DownloadWarningMsg );
115
  }
120
  }
116
121
117
  private void createButtons( final Group targetSelectionGroup ) {
122
  private void createButtons( Group targetSelectionGroup ) {
118
    Button latestStableBuildBtn = new Button( targetSelectionGroup, SWT.RADIO );
123
    Button latestStableBuildBtn = new Button( targetSelectionGroup, SWT.RADIO );
119
    String latestBuildText = IntroMessages.InstallTargetDialog_LatestBuildText;
124
    String latestBuildText = IntroMessages.InstallTargetDialog_LatestBuildText;
120
    latestStableBuildBtn.setText( latestBuildText );
125
    latestStableBuildBtn.setText( latestBuildText );
121
    latestStableBuildBtn.setSelection( true );
126
    latestStableBuildBtn.setSelection( true );
122
    latestStableBuildBtn.addSelectionListener( new SelectionAdapter() {
127
    latestStableBuildBtn.addSelectionListener( new SelectionAdapter() {
123
      public void widgetSelected( final SelectionEvent e ) {
128
      public void widgetSelected( SelectionEvent e ) {
124
        isLatestBuild = true;
129
        isLatestBuild = true;
125
      }
130
      }
126
    } );
131
    } );
Lines 129-162 Link Here
129
      = IntroMessages.InstallTargetDialog_LatestReleaseText;
134
      = IntroMessages.InstallTargetDialog_LatestReleaseText;
130
    latestReleaseBtn.setText( latestReleaseText );
135
    latestReleaseBtn.setText( latestReleaseText );
131
    latestReleaseBtn.addSelectionListener( new SelectionAdapter() {
136
    latestReleaseBtn.addSelectionListener( new SelectionAdapter() {
132
      public void widgetSelected( final SelectionEvent e ) {
137
      public void widgetSelected( SelectionEvent e ) {
133
        isLatestBuild = false;
138
        isLatestBuild = false;
134
      }
139
      }
135
    } );
140
    } );
136
  }
141
  }
137
142
138
  private void createSwitchTargetArea( final Composite parent ) {
143
  private void createSwitchTargetArea( Composite parent ) {
139
    Composite container = new Composite( parent, SWT.NONE );
144
    Composite container = new Composite( parent, SWT.NONE );
145
    container.setLayout( new GridLayout() );
140
    container.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, false ) );
146
    container.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, false ) );
141
    FillLayout layout = new FillLayout();
142
    layout.marginWidth = 5;
143
    layout.marginHeight = 5;
144
    container.setLayout( layout );
145
    Group grgTarget = new Group( container, SWT.NONE );
147
    Group grgTarget = new Group( container, SWT.NONE );
146
    grgTarget.setLayout( new GridLayout() );
148
    grgTarget.setLayout( new GridLayout() );
149
    grgTarget.setLayoutData( new GridData( SWT.FILL, SWT.TOP, true, false ) );
147
    grgTarget.setText( IntroMessages.InstallDialog_TargetGroup );
150
    grgTarget.setText( IntroMessages.InstallDialog_TargetGroup );
148
    final Button switchTarget = new Button( grgTarget, SWT.CHECK );
151
    final Button switchTarget = new Button( grgTarget, SWT.CHECK );
149
    switchTarget.setText( IntroMessages.InstallDialog_switchTarget );
152
    switchTarget.setText( IntroMessages.InstallDialog_switchTarget );
150
    switchTarget.setSelection( true );
153
    switchTarget.setSelection( true );
151
    switchTarget.addSelectionListener( new SelectionAdapter() {
154
    switchTarget.addSelectionListener( new SelectionAdapter() {
152
      public void widgetSelected( final SelectionEvent e ) {
155
      public void widgetSelected( SelectionEvent e ) {
153
        shouldSwitchTarget = switchTarget.getSelection();
156
        shouldSwitchTarget = switchTarget.getSelection();
154
      }
157
      }
155
    } );
158
    } );
156
    Label lblDescription = new Label( grgTarget, SWT.WRAP );
159
    Label lblDescription = new Label( grgTarget, SWT.WRAP );
160
    lblDescription.setLayoutData( getLayoutDataForDescriptions() );
161
    lblDescription.setText( IntroMessages.InstallDialog_TargetDescription );
162
  }
163
  
164
  private GridData getLayoutDataForDescriptions() {
157
    GridData gridData = new GridData( GridData.FILL_HORIZONTAL );
165
    GridData gridData = new GridData( GridData.FILL_HORIZONTAL );
158
    gridData.widthHint = 120;
166
    gridData.widthHint = 120;
159
    lblDescription.setLayoutData( gridData );
167
    return gridData;
160
    lblDescription.setText( IntroMessages.InstallDialog_TargetDescription );
161
  }
168
  }
169
  
162
}
170
}
(-)src/org/eclipse/rap/ui/internal/intro/target/IntroMessages.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2011 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2007, 2011 EclipseSource and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 37-43 Link Here
37
  public static String InstallRAPTargetHandler_SwitchTargetFailed;
37
  public static String InstallRAPTargetHandler_SwitchTargetFailed;
38
  public static String InstallRAPTargetHandler_SwitchTargetInterrupted;
38
  public static String InstallRAPTargetHandler_SwitchTargetInterrupted;
39
39
40
  public static String InstallTargetDialog_DownloadWarningMsg;
40
  public static String InstallTargetDialog_TargetDescriptionMsg;
41
41
42
  public static String InstallTargetDialog_LatestBuildText;
42
  public static String InstallTargetDialog_LatestBuildText;
43
43
(-)src/org/eclipse/rap/ui/internal/intro/target/messages.properties (-15 / +16 lines)
Lines 1-5 Link Here
1
###############################################################################
1
###############################################################################
2
# Copyright (c) 2007, 2011 Innoopract Informationssysteme GmbH.
2
# Copyright (c) 2007, 2011 EclipseSource and others.
3
# All rights reserved. This program and the accompanying materials
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
5
# which accompanies this distribution, and is available at
Lines 9-36 Link Here
9
#  Innoopract Informationssysteme GmbH - initial API and implementation
9
#  Innoopract Informationssysteme GmbH - initial API and implementation
10
#  EclipseSource - ongoing development
10
#  EclipseSource - ongoing development
11
################################################################################
11
################################################################################
12
InstallDialog_ShellTitle=Target Platform Installation
12
InstallDialog_ShellTitle=RAP Target Platform Installation
13
InstallDialog_validPath=You need to define a valid location for the target
13
InstallDialog_validPath=You need to define a valid location for the target
14
InstallDialog_DialogTitle=Configure Target Platform Installation
14
InstallDialog_DialogTitle=Download and install a RAP target platform
15
InstallDialog_Message_selectDirMsg=Select a directory in which the target platform should be installed.
15
InstallDialog_Message_selectDirMsg=Select a directory in which the target platform should be installed.
16
InstallDialog_Message_selectDirText=Select Direcetory
16
InstallDialog_Message_selectDirText=Select Direcetory
17
InstallDialog_Message_selectLocation=Select a RAP target version.
17
InstallDialog_Message_selectLocation=Select a version to install
18
InstallDialog_Location=&Location:
18
InstallDialog_Location=&Location:
19
InstallDialog_Browse=&Browse...
19
InstallDialog_Browse=&Browse...
20
InstallDialog_switchTarget=&Switch the target after installation (recommended)
20
InstallDialog_switchTarget=&Activate the target after installation (recommended)
21
InstallDialog_TargetDescription=RAP is a platform itself and cannot be \
21
InstallDialog_TargetDescription=If you don't activate the RAP target now, you can also do that \
22
  installed on top of an existing Eclipse installation. If you don't want \
22
  manually in the preferences.
23
  to switch the target now, you need to do it manually before writing \
24
  applications on top of RAP.\nIf you have projects in your workspace which \
25
  are compiled against RCP you may get compile errors after switching the \
26
  target.
27
InstallDialog_TargetGroup=Target activation
23
InstallDialog_TargetGroup=Target activation
28
InstallRAPTargetAction_FailedExecuteCommand=Failed execute command: {0}
24
InstallRAPTargetAction_FailedExecuteCommand=Failed execute command: {0}
29
InstallRAPTargetHandler_InstallFailed=Failed to install target platform.
25
InstallRAPTargetHandler_InstallFailed=Failed to install target platform.
30
InstallRAPTargetHandler_InstallInterrupted=Installing target interrupted.
26
InstallRAPTargetHandler_InstallInterrupted=Installing target interrupted.
31
InstallRAPTargetHandler_SwitchTargetFailed=Failed to switch to RAP target platform.
27
InstallRAPTargetHandler_SwitchTargetFailed=Failed to switch to RAP target platform.
32
InstallRAPTargetHandler_SwitchTargetInterrupted=InterruptedException occured while switching to RAP target platform. 
28
InstallRAPTargetHandler_SwitchTargetInterrupted=InterruptedException occured while switching \
33
InstallTargetDialog_DownloadWarningMsg=Target content will be downloaded and this can take a few minutes.
29
  to RAP target platform. 
30
InstallTargetDialog_TargetDescriptionMsg=RAP applications have to be compiled against \
31
  a RAP target platform. This installer will download and install the latest RAP \
32
  target platform from the RAP repository.
34
InstallTargetDialog_LatestBuildText=Latest stable build (latest features, recommended for development)
33
InstallTargetDialog_LatestBuildText=Latest stable build (latest features, recommended for development)
35
InstallTargetDialog_LatestReleaseText=Latest release
34
InstallTargetDialog_LatestReleaseText=Latest release
36
InstallTargetDialog_TargetVersionGroupTitle=Target selection
35
InstallTargetDialog_TargetVersionGroupTitle=Target selection
Lines 40-45 Link Here
40
TargetProvider_InvalidTargetDest=Invalid target destination: {0}
39
TargetProvider_InvalidTargetDest=Invalid target destination: {0}
41
TargetProvider_SourceNotFound=Failed to resolve target platform source.
40
TargetProvider_SourceNotFound=Failed to resolve target platform source.
42
TargetSwitcher_InvalidTargetRepository=Invalid P2 repository <{0}>
41
TargetSwitcher_InvalidTargetRepository=Invalid P2 repository <{0}>
43
TargetSwitcher_NoInternetConnectionAvailableErrorMsg=No internet connection available. RAP target installation needs internet connection to download the target.
42
TargetSwitcher_NoInternetConnectionAvailableErrorMsg=No internet connection available. RAP \
43
  target installation needs internet connection to download the target.
44
TargetSwitcher_TargetDefinitionErrorMsg=Failed to create target definition
44
TargetSwitcher_TargetDefinitionErrorMsg=Failed to create target definition
45
TargetSwitcher_TargetRepositoryProblemErrorMsg=RAP target installation failed to download the target. There are problems with the RAP target repository.
45
TargetSwitcher_TargetRepositoryProblemErrorMsg=RAP target installation failed to download \
46
  the target. There are problems with the RAP target repository.

Return to bug 345403