1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Add description text for board and library install pages.

Change-Id: I6354ab5cc54e16df3ffe0d27fae0eec4158d9546
This commit is contained in:
Doug Schaefer 2015-08-31 21:35:05 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent 04d9a75a59
commit d510c87df6
4 changed files with 36 additions and 4 deletions

View file

@ -26,6 +26,8 @@ public class Messages extends NLS {
public static String NewArduinoTargetWizardPage_3; public static String NewArduinoTargetWizardPage_3;
public static String NewArduinoTargetWizardPage_4; public static String NewArduinoTargetWizardPage_4;
public static String NewArduinoTargetWizardPage_5; public static String NewArduinoTargetWizardPage_5;
public static String ArduinoBoardsPreferencePage_desc;
public static String LibrariesPropertyPage_desc;
static { static {
// initialize resource bundle // initialize resource bundle

View file

@ -20,3 +20,9 @@ NewArduinoTargetWizardPage_2=Target name:
NewArduinoTargetWizardPage_3= NewArduinoTargetWizardPage_3=
NewArduinoTargetWizardPage_4=Serial port: NewArduinoTargetWizardPage_4=Serial port:
NewArduinoTargetWizardPage_5=Board type: NewArduinoTargetWizardPage_5=Board type:
ArduinoBoardsPreferencePage_desc=Select a board you would like to install and click Install and then \
OK or Apply to install the SDK and Tools for that board. By doing so you agree to the licenses of the \
libraries and tools. For more information, see http://arduino.cc.
LibrariesPropertyPage_desc=Select libraries to use in your project and click OK or Apply. \
If necessary the library will be installed. By adding libraries you agree to the licenses of those \
libraries. For more information, see http://arduino.cc

View file

@ -20,6 +20,7 @@ import org.eclipse.cdt.arduino.core.internal.board.ArduinoPackage;
import org.eclipse.cdt.arduino.core.internal.board.ArduinoPlatform; import org.eclipse.cdt.arduino.core.internal.board.ArduinoPlatform;
import org.eclipse.cdt.arduino.core.internal.board.PackageIndex; import org.eclipse.cdt.arduino.core.internal.board.PackageIndex;
import org.eclipse.cdt.arduino.ui.internal.Activator; import org.eclipse.cdt.arduino.ui.internal.Activator;
import org.eclipse.cdt.arduino.ui.internal.Messages;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
@ -39,6 +40,7 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.IWorkbenchPreferencePage;
@ -55,8 +57,21 @@ public class ArduinoBoardsPreferencePage extends PreferencePage implements IWork
@Override @Override
protected Control createContents(Composite parent) { protected Control createContents(Composite parent) {
Composite comp = new Composite(parent, SWT.NONE); Composite control = new Composite(parent, SWT.NONE);
comp.setLayout(new GridLayout(2, false)); control.setLayout(new GridLayout());
Text desc = new Text(control, SWT.READ_ONLY | SWT.WRAP);
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, false);
layoutData.widthHint = 500;
desc.setLayoutData(layoutData);
desc.setBackground(parent.getBackground());
desc.setText(Messages.ArduinoBoardsPreferencePage_desc);
Composite comp = new Composite(control, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
layout.marginWidth = 0;
comp.setLayout(layout);
comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
Composite tableComp = new Composite(comp, SWT.NONE); Composite tableComp = new Composite(comp, SWT.NONE);
tableComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); tableComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
@ -110,7 +125,7 @@ public class ArduinoBoardsPreferencePage extends PreferencePage implements IWork
updateTable(); updateTable();
updateButtons(); updateButtons();
return comp; return control;
} }
private void updateTable() { private void updateTable() {

View file

@ -15,6 +15,7 @@ import org.eclipse.cdt.arduino.core.internal.board.ArduinoLibrary;
import org.eclipse.cdt.arduino.core.internal.board.ArduinoManager; import org.eclipse.cdt.arduino.core.internal.board.ArduinoManager;
import org.eclipse.cdt.arduino.core.internal.board.LibraryIndex; import org.eclipse.cdt.arduino.core.internal.board.LibraryIndex;
import org.eclipse.cdt.arduino.ui.internal.Activator; import org.eclipse.cdt.arduino.ui.internal.Activator;
import org.eclipse.cdt.arduino.ui.internal.Messages;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.BaseLabelProvider; import org.eclipse.jface.viewers.BaseLabelProvider;
@ -28,6 +29,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn; import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem; import org.eclipse.swt.widgets.TreeItem;
@ -122,6 +124,13 @@ public class LibrariesPropertyPage extends PropertyPage {
Composite comp = new Composite(parent, SWT.NULL); Composite comp = new Composite(parent, SWT.NULL);
comp.setLayout(new GridLayout()); comp.setLayout(new GridLayout());
Text desc = new Text(comp, SWT.READ_ONLY | SWT.WRAP);
GridData layoutData = new GridData(SWT.LEFT, SWT.FILL, true, false);
layoutData.widthHint = 500;
desc.setLayoutData(layoutData);
desc.setBackground(parent.getBackground());
desc.setText(Messages.LibrariesPropertyPage_desc);
filteredTree = new FilteredTree(comp, SWT.CHECK | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL, filteredTree = new FilteredTree(comp, SWT.CHECK | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL,
new PatternFilter() { new PatternFilter() {
@Override @Override
@ -142,7 +151,7 @@ public class LibrariesPropertyPage extends PropertyPage {
return new ContainerCheckedTreeViewer(parent, style); return new ContainerCheckedTreeViewer(parent, style);
} }
}; };
filteredTree.setLayoutData(new GridData(GridData.FILL_BOTH)); filteredTree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
ContainerCheckedTreeViewer viewer = (ContainerCheckedTreeViewer) filteredTree.getViewer(); ContainerCheckedTreeViewer viewer = (ContainerCheckedTreeViewer) filteredTree.getViewer();