From: stefanbjarni Date: Fri, 1 Jul 2005 01:12:47 +0000 (+0000) Subject: Merged the 3.1 compatibility patches from the eclipse3_1compat branch into the HEAD. X-Git-Url: http://git.phpeclipse.com Merged the 3.1 compatibility patches from the eclipse3_1compat branch into the HEAD. Had to hack my way past a problem in new debugger code from Martin K�r - IConsoleHyperlink seems to have been moved between 3.0 and 3.1. So the ConsoleLineTracker is unlikely to work right now. --- diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/logview/EventDetailsDialogAction.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/logview/EventDetailsDialogAction.java index 9a32632..66df394 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/logview/EventDetailsDialogAction.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/logview/EventDetailsDialogAction.java @@ -39,7 +39,7 @@ public class EventDetailsDialogAction extends SelectionProviderAction{ * the property dialog will describe */ public EventDetailsDialogAction(Shell shell, ISelectionProvider provider){ - super(provider, WorkbenchMessages.getString("PropertyDialog.text")); //$NON-NLS-1$ + super(provider, WorkbenchMessages.PropertyDialog_text); //$NON-NLS-1$ Assert.isNotNull(shell); this.shell = shell; this.provider = provider; diff --git a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java index 1c2c288..f898f61 100644 --- a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java +++ b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java @@ -146,7 +146,8 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget { // } // new BreakpointLocationVerifierJob(document, breakpoint, lineNumber, typeName, type, resource, (IEditorStatusLine) editorPart.getAdapter(IEditorStatusLine.class)).schedule(); } catch (CoreException ce) { - ExceptionHandler.handle(ce, ActionMessages.getString("ManageBreakpointActionDelegate.error.title1"), ActionMessages.getString("ManageBreakpointActionDelegate.error.message1")); //$NON-NLS-1$ //$NON-NLS-2$ + // TODO: no message in ActionMessages + //ExceptionHandler.handle(ce, ActionMessages.getString("ManageBreakpointActionDelegate.error.title1"), ActionMessages.getString("ManageBreakpointActionDelegate.error.message1")); //$NON-NLS-1$ //$NON-NLS-2$ return; } } diff --git a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPEnvironmentTab2.java b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPEnvironmentTab2.java index 9681d2c..c6dd5e0 100644 --- a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPEnvironmentTab2.java +++ b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPEnvironmentTab2.java @@ -81,16 +81,16 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { protected TableViewer environmentTable; protected String[] envTableColumnHeaders = { - LaunchConfigurationsMessages.getString("EnvironmentTab.Variable_1"), //$NON-NLS-1$ - LaunchConfigurationsMessages.getString("EnvironmentTab.Value_2"), //$NON-NLS-1$ + LaunchConfigurationsMessages.EnvironmentTab_Variable_1, //$NON-NLS-1$ + LaunchConfigurationsMessages.EnvironmentTab_Value_2 //$NON-NLS-1$ }; protected ColumnLayoutData[] envTableColumnLayouts = { new ColumnWeightData(50), new ColumnWeightData(50) }; - private static final String NAME_LABEL= LaunchConfigurationsMessages.getString("EnvironmentTab.8"); //$NON-NLS-1$ - private static final String VALUE_LABEL= LaunchConfigurationsMessages.getString("EnvironmentTab.9"); //$NON-NLS-1$ + private static final String NAME_LABEL= LaunchConfigurationsMessages.EnvironmentTab_8; //$NON-NLS-1$ + private static final String VALUE_LABEL= LaunchConfigurationsMessages.EnvironmentTab_9; //$NON-NLS-1$ protected static final String P_VARIABLE = "variable"; //$NON-NLS-1$ protected static final String P_VALUE = "value"; //$NON-NLS-1$ protected static String[] envTableColumnProperties = @@ -217,13 +217,13 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { appendReplaceComposite.setLayout(layout); appendReplaceComposite.setFont(parent.getFont()); - appendEnvironment= createRadioButton(appendReplaceComposite, LaunchConfigurationsMessages.getString("EnvironmentTab.16")); //$NON-NLS-1$ + appendEnvironment= createRadioButton(appendReplaceComposite, LaunchConfigurationsMessages.EnvironmentTab_16); //$NON-NLS-1$ appendEnvironment.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updateLaunchConfigurationDialog(); } }); - replaceEnvironment= createRadioButton(appendReplaceComposite, LaunchConfigurationsMessages.getString("EnvironmentTab.17")); //$NON-NLS-1$ + replaceEnvironment= createRadioButton(appendReplaceComposite, LaunchConfigurationsMessages.EnvironmentTab_17); //$NON-NLS-1$ } /** @@ -257,7 +257,7 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { // Create label Label label = new Label(tableComposite, SWT.NONE); label.setFont(font); - label.setText(LaunchConfigurationsMessages.getString("EnvironmentTab.Environment_variables_to_set__3")); //$NON-NLS-1$ + label.setText(LaunchConfigurationsMessages.EnvironmentTab_Environment_variables_to_set__3); //$NON-NLS-1$ // Create table environmentTable = new TableViewer(tableComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION); Table table = environmentTable.getTable(); @@ -319,7 +319,7 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { createVerticalSpacer(buttonComposite, 1); // Create buttons - envAddButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.getString("EnvironmentTab.New_4"), null); //$NON-NLS-1$ + envAddButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_New_4, null); //$NON-NLS-1$ envAddButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { @@ -333,13 +333,13 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { } }); - envSelectButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.getString("EnvironmentTab.18"), null); //$NON-NLS-1$ + envSelectButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_18, null); //$NON-NLS-1$ envSelectButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { handleEnvSelectButtonSelected(); } }); - envEditButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.getString("EnvironmentTab.Edit_5"), null); //$NON-NLS-1$ + envEditButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_Edit_5, null); //$NON-NLS-1$ envEditButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { @@ -347,7 +347,7 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { } }); envEditButton.setEnabled(false); - envRemoveButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.getString("EnvironmentTab.Remove_6"), null); //$NON-NLS-1$ + envRemoveButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_Remove_6, null); //$NON-NLS-1$ envRemoveButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { @@ -361,7 +361,7 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { * Adds a new environment variable to the table. */ protected void handleEnvAddButtonSelected() { - MultipleInputDialog dialog = new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.getString("EnvironmentTab.22")); //$NON-NLS-1$ + MultipleInputDialog dialog = new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.EnvironmentTab_22); //$NON-NLS-1$ dialog.addTextField(NAME_LABEL, null, false); dialog.addVariablesField(VALUE_LABEL, null, true); @@ -391,7 +391,7 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { for (int i = 0; i < items.length; i++) { EnvironmentVariable existingVariable = (EnvironmentVariable) items[i].getData(); if (existingVariable.getName().equals(name)) { - boolean overWrite= MessageDialog.openQuestion(getShell(), LaunchConfigurationsMessages.getString("EnvironmentTab.12"), MessageFormat.format(LaunchConfigurationsMessages.getString("EnvironmentTab.13"), new String[] {name})); //$NON-NLS-1$ //$NON-NLS-2$ + boolean overWrite= MessageDialog.openQuestion(getShell(), LaunchConfigurationsMessages.EnvironmentTab_12, MessageFormat.format(LaunchConfigurationsMessages.EnvironmentTab_13, new String[] {name})); //$NON-NLS-1$ //$NON-NLS-2$ if (!overWrite) { return false; } @@ -419,8 +419,8 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { envVariables.remove(var.getName()); } - ListSelectionDialog dialog = new NativeEnvironmentDialog(getShell(), envVariables, createSelectionDialogContentProvider(), createSelectionDialogLabelProvider(), LaunchConfigurationsMessages.getString("EnvironmentTab.19")); //$NON-NLS-1$ - dialog.setTitle(LaunchConfigurationsMessages.getString("EnvironmentTab.20")); //$NON-NLS-1$ + ListSelectionDialog dialog = new NativeEnvironmentDialog(getShell(), envVariables, createSelectionDialogContentProvider(), createSelectionDialogLabelProvider(), LaunchConfigurationsMessages.EnvironmentTab_19); //$NON-NLS-1$ + dialog.setTitle(LaunchConfigurationsMessages.EnvironmentTab_20); //$NON-NLS-1$ int button = dialog.open(); if (button == Window.OK) { @@ -469,8 +469,8 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { envVariables.remove(var.getName()); } - ListSelectionDialog dialog = new NativeEnvironmentDialog(getShell(), envVariables, createSelectionDialogContentProvider(), createSelectionDialogLabelProvider(), LaunchConfigurationsMessages.getString("EnvironmentTab.19")); //$NON-NLS-1$ - dialog.setTitle(LaunchConfigurationsMessages.getString("EnvironmentTab.20")); //$NON-NLS-1$ + ListSelectionDialog dialog = new NativeEnvironmentDialog(getShell(), envVariables, createSelectionDialogContentProvider(), createSelectionDialogLabelProvider(), LaunchConfigurationsMessages.EnvironmentTab_19); //$NON-NLS-1$ + dialog.setTitle(LaunchConfigurationsMessages.EnvironmentTab_20); //$NON-NLS-1$ int button = dialog.open(); if (button == Window.OK) { @@ -571,7 +571,7 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { } String originalName= var.getName(); String value= var.getValue(); - MultipleInputDialog dialog= new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.getString("EnvironmentTab.11")); //$NON-NLS-1$ + MultipleInputDialog dialog= new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.EnvironmentTab_11); //$NON-NLS-1$ dialog.addTextField(NAME_LABEL, originalName, false); dialog.addVariablesField(VALUE_LABEL, value, true); @@ -667,7 +667,7 @@ public class PHPEnvironmentTab2 extends AbstractLaunchConfigurationTab { * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() */ public String getName() { - return LaunchConfigurationsMessages.getString("EnvironmentTab.Environment_7"); //$NON-NLS-1$ + return LaunchConfigurationsMessages.EnvironmentTab_Environment_7; //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/ConsoleLineTracker.java b/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/ConsoleLineTracker.java index e1cf774..5eb4656 100644 --- a/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/ConsoleLineTracker.java +++ b/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/ConsoleLineTracker.java @@ -8,7 +8,7 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.debug.ui.console.IConsole; -import org.eclipse.debug.ui.console.IConsoleHyperlink; +// TODO XXX Disabled for 3.1 import org.eclipse.debug.ui.console.IConsoleHyperlink; import org.eclipse.debug.ui.console.IConsoleLineTracker; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; @@ -20,7 +20,7 @@ import org.eclipse.ui.texteditor.ITextEditor; public class ConsoleLineTracker implements IConsoleLineTracker { - private static class JavadocConsoleHyperLink implements IConsoleHyperlink { + private static class JavadocConsoleHyperLink /* TODO XXX Disabled for 3.1 implements IConsoleHyperlink */ { private IPath fExternalPath; private int fLineNumber; @@ -124,7 +124,7 @@ public class ConsoleLineTracker implements IConsoleLineTracker { if (lineNumber != -1) { JavadocConsoleHyperLink link= new JavadocConsoleHyperLink(path, lineNumber); - fConsole.addLink(link, line.getOffset(), index1); + // TODO XXX Disabled for 3.1 fConsole.addLink(link, line.getOffset(), index1); } } catch (BadLocationException e) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/OpenDeclarationEditorAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/OpenDeclarationEditorAction.java index aa7e725..c16ef85 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/OpenDeclarationEditorAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/OpenDeclarationEditorAction.java @@ -27,10 +27,10 @@ import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.window.Window; +import org.eclipse.search.internal.ui.util.ListContentProvider; import org.eclipse.swt.graphics.Point; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.dialogs.ListSelectionDialog; -import org.eclipse.ui.internal.dialogs.ListContentProvider; public class OpenDeclarationEditorAction { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPOpenAllIncludesEditorAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPOpenAllIncludesEditorAction.java index d5ad634..35f949e 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPOpenAllIncludesEditorAction.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPOpenAllIncludesEditorAction.java @@ -27,6 +27,7 @@ import org.eclipse.jface.text.TextSelection; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.window.Window; +import org.eclipse.search.internal.ui.util.ListContentProvider; import org.eclipse.swt.graphics.Point; import org.eclipse.ui.IEditorActionDelegate; import org.eclipse.ui.IEditorPart; @@ -35,7 +36,6 @@ import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.actions.ActionDelegate; import org.eclipse.ui.dialogs.ListSelectionDialog; -import org.eclipse.ui.internal.dialogs.ListContentProvider; public class PHPOpenAllIncludesEditorAction extends ActionDelegate implements IEditorActionDelegate { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java index c8660ec..301c6a1 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPDocumentProvider.java @@ -1590,7 +1590,7 @@ protected DocumentProviderOperation createSaveOperation(final Object element, fi * @param toCreateOrModify the resource to create or modify * @return the minimal scheduling rule needed to modify or create a resource */ - private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) { + protected ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) { IResourceRuleFactory factory= ResourcesPlugin.getWorkspace().getRuleFactory(); if (toCreateOrModify.exists()) { return factory.modifyRule(toCreateOrModify);