X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/ui/internal/ConfigurationComposite.java b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/ui/internal/ConfigurationComposite.java index cffe190..4293c8e 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/ui/internal/ConfigurationComposite.java +++ b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/ui/internal/ConfigurationComposite.java @@ -48,8 +48,8 @@ public class ConfigurationComposite extends Composite { protected Button edit; protected Button remove; - protected Button start; - protected Button stop; +// protected Button start; +// protected Button stop; protected List selection2; @@ -80,6 +80,7 @@ public class ConfigurationComposite extends Composite { table = new Table(this, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION); data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL); data.widthHint = 300; + data.heightHint = 300; // WorkbenchHelp.setHelp(table, ContextIds.PREF_MONITORS); table.setLayoutData(data); @@ -87,10 +88,10 @@ public class ConfigurationComposite extends Composite { table.setLinesVisible(true); TableLayout tableLayout = new TableLayout(); - + TableColumn statusColumn = new TableColumn(table, SWT.NONE); - statusColumn.setText(WikiEditorPlugin.getResource("%columnStatus")); - ColumnWeightData colData = new ColumnWeightData(6, 30, true); + statusColumn.setText(WikiEditorPlugin.getResource("%columnName")); + ColumnWeightData colData = new ColumnWeightData(5, 30, true); tableLayout.addColumnData(colData); TableColumn typeColumn = new TableColumn(table, SWT.NONE); @@ -99,22 +100,21 @@ public class ConfigurationComposite extends Composite { tableLayout.addColumnData(colData); TableColumn urlColumn = new TableColumn(table, SWT.NONE); - urlColumn.setText(WikiEditorPlugin.getResource("%columnURL")); - colData = new ColumnWeightData(12, 150, true); + urlColumn.setText(WikiEditorPlugin.getResource("%columnUser")); + colData = new ColumnWeightData(5, 30, true); tableLayout.addColumnData(colData); - + TableColumn localColumn = new TableColumn(table, SWT.NONE); - localColumn.setText(WikiEditorPlugin.getResource("%columnUser")); - colData = new ColumnWeightData(5, 50, true); + localColumn.setText(WikiEditorPlugin.getResource("%columnURL")); + colData = new ColumnWeightData(5, 150, true); tableLayout.addColumnData(colData); table.setLayout(tableLayout); - + tableViewer = new TableViewer(table); tableViewer.setContentProvider(new ConfigurationContentProvider()); tableViewer.setLabelProvider(new ConfigurationTableLabelProvider()); tableViewer.setInput("root"); - tableViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { setSelection(event.getSelection()); @@ -181,41 +181,41 @@ public class ConfigurationComposite extends Composite { }); remove.setEnabled(false); - start = SWTUtil.createButton(buttonComp, WikiEditorPlugin.getResource("%start")); - start.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - Iterator iterator = getSelection().iterator(); - while (iterator.hasNext()) { - IConfiguration configuration = (IConfiguration) iterator.next(); +// start = SWTUtil.createButton(buttonComp, WikiEditorPlugin.getResource("%start")); +// start.addSelectionListener(new SelectionAdapter() { +// public void widgetSelected(SelectionEvent e) { +// Iterator iterator = getSelection().iterator(); +// while (iterator.hasNext()) { +// IConfiguration configuration = (IConfiguration) iterator.next(); +//// try { +//// WikiEditorPlugin.startMonitor(monitor); +//// } catch (CoreException ce) { +//// MessageDialog.openError(getShell(), WikiEditorPlugin.getResource("%errorDialogTitle"), ce.getStatus().getMessage()); +//// } catch (Exception ce) { +//// MessageDialog.openError(getShell(), WikiEditorPlugin.getResource("%errorDialogTitle"), ce.getMessage()); +//// } +// tableViewer.refresh(configuration, true); +// } +// tableViewer.setSelection(tableViewer.getSelection()); +// } +// }); +// start.setEnabled(false); +// +// stop = SWTUtil.createButton(buttonComp, WikiEditorPlugin.getResource("%stop")); +// stop.addSelectionListener(new SelectionAdapter() { +// public void widgetSelected(SelectionEvent e) { +// Iterator iterator = getSelection().iterator(); +// while (iterator.hasNext()) { +// IConfiguration monitor = (IConfiguration) iterator.next(); // try { -// WikiEditorPlugin.startMonitor(monitor); -// } catch (CoreException ce) { -// MessageDialog.openError(getShell(), WikiEditorPlugin.getResource("%errorDialogTitle"), ce.getStatus().getMessage()); -// } catch (Exception ce) { -// MessageDialog.openError(getShell(), WikiEditorPlugin.getResource("%errorDialogTitle"), ce.getMessage()); -// } - tableViewer.refresh(configuration, true); - } - tableViewer.setSelection(tableViewer.getSelection()); - } - }); - start.setEnabled(false); - - stop = SWTUtil.createButton(buttonComp, WikiEditorPlugin.getResource("%stop")); - stop.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - Iterator iterator = getSelection().iterator(); - while (iterator.hasNext()) { - IConfiguration monitor = (IConfiguration) iterator.next(); - try { -// WikiEditorPlugin.stopMonitor(monitor); - } catch (Exception ex) { } - tableViewer.refresh(monitor, true); - } - tableViewer.setSelection(tableViewer.getSelection()); - } - }); - stop.setEnabled(false); +//// WikiEditorPlugin.stopMonitor(monitor); +// } catch (Exception ex) { } +// tableViewer.refresh(monitor, true); +// } +// tableViewer.setSelection(tableViewer.getSelection()); +// } +// }); +// stop.setEnabled(false); } protected List getSelection() { @@ -236,25 +236,25 @@ public class ConfigurationComposite extends Composite { if (!selection2.isEmpty()) { remove.setEnabled(true); - boolean allStopped = true; - boolean allStarted = true; +// boolean allStopped = true; +// boolean allStarted = true; - iterator = selection2.iterator(); - while (iterator.hasNext()) { - IConfiguration monitor = (IConfiguration) iterator.next(); - if (monitor.isActive()) - allStopped = false; - else - allStarted = false; - } - start.setEnabled(allStopped); - stop.setEnabled(allStarted); - edit.setEnabled(selection2.size() == 1 && allStopped); +// iterator = selection2.iterator(); +// while (iterator.hasNext()) { +// IConfiguration monitor = (IConfiguration) iterator.next(); +// if (monitor.isActive()) +// allStopped = false; +// else +// allStarted = false; +// } +// start.setEnabled(allStopped); +// stop.setEnabled(allStarted); + edit.setEnabled(true); } else { edit.setEnabled(false); remove.setEnabled(false); - start.setEnabled(false); - stop.setEnabled(false); +// start.setEnabled(false); +// stop.setEnabled(false); } } } \ No newline at end of file