aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Niewrzal2018-05-12 07:58:42 -0400
committerMichal Niewrzal2018-05-13 16:18:50 -0400
commitcc9287f895a11f5f1def764644f880258c54e602 (patch)
tree0b910bf2746f29423fba72f225cf242f8a60f166
parent6fbce415a33063ed538c4a350a317633d5e1be0f (diff)
downloadorg.eclipse.pdt-cc9287f895a11f5f1def764644f880258c54e602.tar.gz
org.eclipse.pdt-cc9287f895a11f5f1def764644f880258c54e602.tar.xz
org.eclipse.pdt-cc9287f895a11f5f1def764644f880258c54e602.zip
No Bug - Fix some sonar issues
-rw-r--r--plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/ConfigurationPage.java10
-rwxr-xr-xplugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/DependenciesPage.java25
-rwxr-xr-xplugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/OverviewPage.java4
-rwxr-xr-xplugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/parts/composer/PackageSearch.java25
-rw-r--r--plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/wizard/importer/WizardResourceImportPage.java86
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/util/collections/IntHashtable.java55
-rw-r--r--plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/zend/model/PHPDebugTarget.java137
-rw-r--r--plugins/org.eclipse.php.formatter.ui/src/org/eclipse/php/formatter/ui/preferences/LineWrappingTabPage.java45
-rw-r--r--plugins/org.eclipse.php.phpunit/src/org/eclipse/php/phpunit/ui/view/PHPUnitView.java36
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/LocationGroup.java17
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardFirstPage.java54
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardSecondPage.java20
12 files changed, 216 insertions, 298 deletions
diff --git a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/ConfigurationPage.java b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/ConfigurationPage.java
index 3063f6865..4b5d69485 100644
--- a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/ConfigurationPage.java
+++ b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/ConfigurationPage.java
@@ -22,13 +22,13 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
public class ConfigurationPage extends ComposerFormPage {
- public final static String ID = "org.eclipse.php.composer.ui.editor.composer.ConfigurationPage"; //$NON-NLS-1$
+ public static final String ID = "org.eclipse.php.composer.ui.editor.composer.ConfigurationPage"; //$NON-NLS-1$
- protected ComposerFormEditor editor;
+ private ComposerFormEditor editor;
- protected ConfigSection configSection;
- protected ScriptsSection scriptsSection;
- protected RepositoriesSection repositoriesSection;
+ private ConfigSection configSection;
+ private ScriptsSection scriptsSection;
+ private RepositoriesSection repositoriesSection;
private Composite left;
private Composite right;
diff --git a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/DependenciesPage.java b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/DependenciesPage.java
index 377bf8538..4e4429389 100755
--- a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/DependenciesPage.java
+++ b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/DependenciesPage.java
@@ -14,7 +14,6 @@
*/
package org.eclipse.php.composer.ui.editor.composer;
-import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.php.composer.api.ComposerPackage;
import org.eclipse.php.composer.api.collection.Dependencies;
import org.eclipse.php.composer.ui.editor.ComposerFormPage;
@@ -22,7 +21,6 @@ import org.eclipse.php.composer.ui.editor.FormLayoutFactory;
import org.eclipse.php.composer.ui.parts.composer.DependencySelectionFinishedListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.events.ExpansionAdapter;
@@ -36,26 +34,19 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
*/
public class DependenciesPage extends ComposerFormPage {
- public final static String ID = "org.eclipse.php.composer.ui.editor.composer.DependencyPage"; //$NON-NLS-1$
+ public static final String ID = "org.eclipse.php.composer.ui.editor.composer.DependencyPage"; //$NON-NLS-1$
private ComposerPackage composerPackage;
- protected ComposerFormEditor editor;
+ private ComposerFormEditor editor;
- protected Composite left;
- protected Composite right;
- protected DependencySection activeSection;
+ private Composite left;
+ private Composite right;
+ private DependencySection activeSection;
- protected DependencySection requireSection = null;
- protected TableViewer requireView;
- protected Button requireEdit;
- protected Button requireRemove;
+ private DependencySection requireSection = null;
- protected DependencySection requireDevSection;
- protected TableViewer requireDevView;
- protected Button requireDevEdit;
- protected Button requireDevRemove;
-
- protected DependencySearchSection searchSection;
+ private DependencySection requireDevSection;
+ private DependencySearchSection searchSection;
/**
* @param editor
diff --git a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/OverviewPage.java b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/OverviewPage.java
index cfb59452f..012c8afbc 100755
--- a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/OverviewPage.java
+++ b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/editor/composer/OverviewPage.java
@@ -31,9 +31,9 @@ import org.eclipse.ui.forms.widgets.*;
*/
public class OverviewPage extends ComposerFormPage {
- public final static String ID = "org.eclipse.php.composer.ui.editor.composer.OverviewPage"; //$NON-NLS-1$
+ public static final String ID = "org.eclipse.php.composer.ui.editor.composer.OverviewPage"; //$NON-NLS-1$
- protected ComposerFormEditor editor;
+ private ComposerFormEditor editor;
private Composite left;
private Composite right;
diff --git a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/parts/composer/PackageSearch.java b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/parts/composer/PackageSearch.java
index 9c9fc8d48..df53c034f 100755
--- a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/parts/composer/PackageSearch.java
+++ b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/parts/composer/PackageSearch.java
@@ -27,8 +27,6 @@ import org.eclipse.php.composer.ui.controller.PackageController;
import org.eclipse.php.composer.ui.editor.FormLayoutFactory;
import org.eclipse.php.composer.ui.utils.WidgetFactory;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
@@ -38,8 +36,8 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
public class PackageSearch implements PackageSearchListenerInterface, IPackageCheckStateChangedListener {
- protected final static long QUERY_DELAY_MS = 300;
- protected final static long RESET_QUERY_DELAY_MS = 1500;
+ protected static final long QUERY_DELAY_MS = 300;
+ protected static final long RESET_QUERY_DELAY_MS = 1500;
protected FormToolkit toolkit;
protected WidgetFactory factory;
@@ -124,24 +122,7 @@ public class PackageSearch implements PackageSearchListenerInterface, IPackageCh
searchField.setEnabled(enabled);
searchField.setEditable(enabled);
searchField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- searchField.addModifyListener(new ModifyListener() {
- @Override
- public void modifyText(ModifyEvent e) {
- searchTextChanged();
- }
- });
-
- // clicking the cancel icon sets content to null and invokes
- // modifyText()
- // ... no need to to it manually
- //
- // searchField.addSelectionListener(new SelectionAdapter() {
- // public void widgetDefaultSelected(SelectionEvent e) {
- // if (e.detail == SWT.ICON_CANCEL) {
- // clearSearchText();
- // }
- // }
- // });
+ searchField.addModifyListener(e -> searchTextChanged());
// create search results viewer
int style = SWT.H_SCROLL | SWT.V_SCROLL;
diff --git a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/wizard/importer/WizardResourceImportPage.java b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/wizard/importer/WizardResourceImportPage.java
index e2c7e8917..a3811542e 100644
--- a/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/wizard/importer/WizardResourceImportPage.java
+++ b/plugins/org.eclipse.php.composer.ui/src/org/eclipse/php/composer/ui/wizard/importer/WizardResourceImportPage.java
@@ -21,7 +21,9 @@ import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.dltk.internal.ui.wizards.dialogfields.*;
+import org.eclipse.dltk.internal.ui.wizards.dialogfields.LayoutUtil;
+import org.eclipse.dltk.internal.ui.wizards.dialogfields.StringButtonDialogField;
+import org.eclipse.dltk.internal.ui.wizards.dialogfields.StringDialogField;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -50,21 +52,20 @@ import org.eclipse.ui.dialogs.WizardDataTransferPage;
*/
public class WizardResourceImportPage extends WizardDataTransferPage {
- protected String sourceFromDialog;
- protected String source;
- protected String target;
- protected String projectName;
- protected StringButtonDialogField sourcePath;
- protected IPath json;
- protected ComposerPackage composerPackage;
- protected StringDialogField projectNameField;
- protected IWorkspace workspace;
- protected StringButtonDialogField targetPath;
- protected Button useWorkspaceLocation;
- protected final String defaultMessage = Messages.WizardResourceImportPage_Description;
- protected String lastNameFromProjectFile = null;
-
- protected boolean useWorkspace = true;
+ private String sourceFromDialog;
+ private String source;
+ private String target;
+ private String projectName;
+ private StringButtonDialogField sourcePath;
+ private IPath json;
+ private ComposerPackage composerPackage;
+ private StringDialogField projectNameField;
+ private IWorkspace workspace;
+ private StringButtonDialogField targetPath;
+ private Button useWorkspaceLocation;
+ private static final String defaultMessage = Messages.WizardResourceImportPage_Description;
+
+ private boolean useWorkspace = true;
public WizardResourceImportPage(IWorkbench aWorkbench, IStructuredSelection selection, String[] strings) {
super(Messages.WizardResourceImportPage_Name);
@@ -106,25 +107,19 @@ public class WizardResourceImportPage extends WizardDataTransferPage {
projectNameField.doFillIntoGrid(control, numColumns);
LayoutUtil.setHorizontalGrabbing(projectNameField.getTextControl(null));
- projectNameField.setDialogFieldListener(new IDialogFieldListener() {
- @Override
- public void dialogFieldChanged(DialogField field) {
- projectName = projectNameField.getText();
- updatePageCompletion();
- }
+ projectNameField.setDialogFieldListener(field -> {
+ projectName = projectNameField.getText();
+ updatePageCompletion();
});
- sourcePath = new StringButtonDialogField(new IStringButtonAdapter() {
- @Override
- public void changeControlPressed(DialogField field) {
- DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN);
- dialog.setMessage(Messages.WizardResourceImportPage_BrowseDialogMessage);
- sourceFromDialog = dialog.open();
- try {
- handleSourcePathChange();
- } catch (Exception e) {
- Logger.logException(e);
- }
+ sourcePath = new StringButtonDialogField(field -> {
+ DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN);
+ dialog.setMessage(Messages.WizardResourceImportPage_BrowseDialogMessage);
+ sourceFromDialog = dialog.open();
+ try {
+ handleSourcePathChange();
+ } catch (Exception e) {
+ Logger.logException(e);
}
});
@@ -142,7 +137,7 @@ public class WizardResourceImportPage extends WizardDataTransferPage {
useWorkspaceLocation.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- targetPath.setEnabled(useWorkspaceLocation.getSelection() == false);
+ targetPath.setEnabled(!useWorkspaceLocation.getSelection());
useWorkspace = useWorkspaceLocation.getSelection();
updatePageCompletion();
}
@@ -152,21 +147,6 @@ public class WizardResourceImportPage extends WizardDataTransferPage {
// source location as the project location
useWorkspaceLocation.setVisible(false);
- /*
- * targetPath = new StringButtonDialogField(new IStringButtonAdapter() {
- *
- * @Override public void changeControlPressed(DialogField field) {
- * DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN);
- * dialog.setMessage("Select the target location"); target = dialog.open(); try
- * { handleTargetPathChange(); } catch (IOException e) { Logger.logException(e);
- * } } });
- *
- * targetPath.setLabelText("Target path"); targetPath.setButtonLabel("Browse");
- * targetPath.doFillIntoGrid(control, numColumns);
- * targetPath.getTextControl(null).setEnabled(false);
- * targetPath.setEnabled(false);
- */
-
LayoutUtil.setHorizontalGrabbing(sourcePath.getTextControl(null));
setControl(control);
@@ -177,11 +157,6 @@ public class WizardResourceImportPage extends WizardDataTransferPage {
}
protected void handleTargetPathChange() throws IOException {
-
- if (target != null) {
- // targetPath.setText(target);
- }
-
updatePageCompletion();
}
@@ -242,7 +217,7 @@ public class WizardResourceImportPage extends WizardDataTransferPage {
projectNameField.getTextControl(null).setEnabled(true);
- if (source == null || json == null || json.toFile().exists() == false) {
+ if (source == null || json == null || !json.toFile().exists()) {
setErrorMessage(Messages.WizardResourceImportPage_NoComposerJsonError);
return false;
}
@@ -262,7 +237,6 @@ public class WizardResourceImportPage extends WizardDataTransferPage {
projectName = projectDescription.getName();
projectNameField.setTextWithoutUpdate(projectName);
projectNameField.getTextControl(null).setEnabled(false);
- lastNameFromProjectFile = projectName;
setMessage(Messages.WizardResourceImportPage_EclipseProjectAvailableMessage);
return true;
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/util/collections/IntHashtable.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/util/collections/IntHashtable.java
index 15f689942..8c1b396fb 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/util/collections/IntHashtable.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/util/collections/IntHashtable.java
@@ -57,12 +57,13 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* specified load factor.
*
* @param initialCapacity
- * the initial capacity of the hashtable.
+ * the initial capacity of the hashtable.
* @param loadFactor
- * the load factor of the hashtable.
+ * the load factor of the hashtable.
* @exception IllegalArgumentException
- * if the initial capacity is less than zero, or if the load
- * factor is nonpositive.
+ * if the initial capacity is less than
+ * zero, or if the load factor is
+ * nonpositive.
*/
public IntHashtable(int initialCapacity, float loadFactor) {
if (initialCapacity < 0) {
@@ -85,9 +86,10 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* default load factor, which is <tt>0.75</tt>.
*
* @param initialCapacity
- * the initial capacity of the hashtable.
+ * the initial capacity of the hashtable.
* @exception IllegalArgumentException
- * if the initial capacity is less than zero.
+ * if the initial capacity is less than
+ * zero.
*/
public IntHashtable(int initialCapacity) {
this(initialCapacity, 0.75f);
@@ -108,7 +110,7 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* <tt>0.75</tt>.
*
* @param t
- * the map whose mappings are to be placed in this map.
+ * the map whose mappings are to be placed in this map.
* @since 1.2
*/
public IntHashtable(IntMap t) {
@@ -171,12 +173,12 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* is part of the Map interface in the collections framework).
*
* @param value
- * a value to search for.
+ * a value to search for.
* @return <code>true</code> if and only if some key maps to the
* <code>value</code> argument in this hashtable as determined by the
* <tt>equals</tt> method; <code>false</code> otherwise.
* @exception NullPointerException
- * if the value is <code>null</code>.
+ * if the value is <code>null</code>.
* @see #containsValue(Object)
* @see Map
*/
@@ -204,7 +206,7 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* predates the Map interface).
*
* @param value
- * value whose presence in this Hashtable is to be tested.
+ * value whose presence in this Hashtable is to be tested.
* @return <tt>true</tt> if this map maps one or more keys to the specified
* value.
* @see Map
@@ -219,7 +221,7 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* Tests if the specified object is a key in this hashtable.
*
* @param key
- * possible key.
+ * possible key.
* @return <code>true</code> if and only if the specified object is a key in
* this hashtable, as determined by the <tt>equals</tt> method;
* <code>false</code> otherwise.
@@ -228,7 +230,7 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
@Override
public synchronized boolean containsKey(int key) {
Entry tab[] = table;
- int hash = key;// .hashCode();
+ int hash = key;
int index = (hash & 0x7FFFFFFF) % tab.length;
for (Entry e = tab[index]; e != null; e = e.next) {
if ((e.hash == hash) && e.key/* .equals( */ == key/* ) */) {
@@ -242,7 +244,7 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* Returns the value to which the specified key is mapped in this hashtable.
*
* @param key
- * a key in the hashtable.
+ * a key in the hashtable.
* @return the value to which the key is mapped in this hashtable;
* <code>null</code> if the key is not mapped to any value in this
* hashtable.
@@ -250,7 +252,7 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
@Override
public synchronized Object get(int key) {
Entry tab[] = table;
- int hash = key;// .hashCode();
+ int hash = key;
int index = (hash & 0x7FFFFFFF) % tab.length;
for (Entry e = tab[index]; e != null; e = e.next) {
if ((e.hash == hash) && e.key/* .equals( */ == key/* ) */) {
@@ -298,13 +300,13 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* that is equal to the original key.
*
* @param key
- * the hashtable key.
+ * the hashtable key.
* @param value
- * the value.
+ * the value.
* @return the previous value of the specified key in this hashtable, or
* <code>null</code> if it did not have one.
* @exception NullPointerException
- * if the key or value is <code>null</code>.
+ * if the key or value is <code>null</code>.
* @see Object#equals(Object)
*/
@Override
@@ -347,7 +349,7 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* method does nothing if the key is not in the hashtable.
*
* @param key
- * the key that needs to be removed.
+ * the key that needs to be removed.
* @return the value to which the key had been mapped in this hashtable, or
* <code>null</code> if the key did not have a mapping.
*/
@@ -379,7 +381,7 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* keys currently in the specified Map.
*
* @param t
- * Mappings to be stored in this map.
+ * Mappings to be stored in this map.
* @since 1.2
*/
@Override
@@ -419,7 +421,6 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
for (int i = table.length; i-- > 0;) {
t.table[i] = (table[i] != null) ? (Entry) table[i].clone() : null;
}
- // t.keySet = null;
t.entrySet = null;
t.values = null;
t.modCount = 0;
@@ -474,8 +475,6 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
}
// Views
-
- // private transient Set keySet = null;
private transient Set<?> entrySet = null;
private transient Collection<?> values = null;
@@ -531,7 +530,7 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
IntMap.Entry entry = (IntMap.Entry) o;
/* Object */int key = entry.getKey();
Entry tab[] = table;
- int hash = key;// .hashCode();
+ int hash = key;
int index = (hash & 0x7FFFFFFF) % tab.length;
for (Entry e = tab[index]; e != null; e = e.next) {
@@ -746,10 +745,10 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
* Hashtable collision list.
*/
private static class Entry implements IntMap.Entry {
- int hash;
- int key;
- Object value;
- Entry next;
+ private int hash;
+ private int key;
+ private Object value;
+ private Entry next;
protected Entry(int hash, int key, Object value, Entry next) {
this.hash = hash;
@@ -809,7 +808,6 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
}
// Types of Enumerations/Iterations
- // private static final int KEYS = 0;
private static final int VALUES = 1;
private static final int ENTRIES = 2;
@@ -872,7 +870,6 @@ public class IntHashtable implements IntMap, Cloneable, Serializable {
if (et != null) {
Entry e = lastReturned = entry;
entry = e.next;
- // return type == KEYS ? e.key : (type == VALUES ? e.value : e);
return type == VALUES ? e.value : e;
}
throw new NoSuchElementException("Hashtable Enumerator"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/zend/model/PHPDebugTarget.java b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/zend/model/PHPDebugTarget.java
index 5dd706e17..c05f33e56 100644
--- a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/zend/model/PHPDebugTarget.java
+++ b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/zend/model/PHPDebugTarget.java
@@ -51,78 +51,77 @@ import org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModel;
public class PHPDebugTarget extends PHPDebugElement
implements IPHPDebugTarget, IBreakpointManagerListener, IStepFilters {
- protected ContextManager fContextManager;
+ private ContextManager fContextManager;
// use step filter or not
- protected boolean isStepFiltersEnabled;
+ private boolean isStepFiltersEnabled;
// containing launch object
- protected ILaunch fLaunch;
- protected IProcess fProcess;
+ private ILaunch fLaunch;
+ private IProcess fProcess;
// program name
- protected String fName;
- protected String fURL;
- protected int fRequestPort;
- protected DebugOutput fDebugOutput = new DebugOutput();
+ private String fName;
+ private String fURL;
+ private int fRequestPort;
+ private DebugOutput fDebugOutput = new DebugOutput();
// suspend state
- protected boolean fSuspended = false;
+ private boolean fSuspended = false;
// terminated state
- protected boolean fTerminated = false;
- protected boolean fTermainateCalled = false;
+ private boolean fTerminated = false;
+ private boolean fTermainateCalled = false;
// threads
- protected PHPThread fThread;
- protected IThread[] fThreads;
- protected IRemoteDebugger debugger;
- protected String fLastcmd;
- protected boolean fStatus;
- protected int fLastStop;
- protected String fLastFileName;
- protected boolean fIsPHPCGI;
- protected boolean fIsRunAsDebug;
-
- protected PHPResponseHandler fPHPResponseHandler;
- protected org.eclipse.php.internal.debug.core.zend.debugger.Debugger.StartResponseHandler fStartResponseHandler;
- protected org.eclipse.php.internal.debug.core.zend.debugger.Debugger.BreakpointAddedResponseHandler fBreakpointAddedResponseHandler;
- protected org.eclipse.php.internal.debug.core.zend.debugger.Debugger.BreakpointRemovedResponseHandler fBreakpointRemovedResponseHandler;
- protected org.eclipse.php.internal.debug.core.zend.debugger.Debugger.StepIntoResponseHandler fStepIntoResponseHandler;
- protected org.eclipse.php.internal.debug.core.zend.debugger.Debugger.StepOverResponseHandler fStepOverResponseHandler;
- protected org.eclipse.php.internal.debug.core.zend.debugger.Debugger.StepOutResponseHandler fStepOutResponseHandler;
- protected org.eclipse.php.internal.debug.core.zend.debugger.Debugger.GoResponseHandler fGoResponseHandler;
- protected org.eclipse.php.internal.debug.core.zend.debugger.Debugger.PauseResponseHandler fPauseResponseHandler;
- protected org.eclipse.php.internal.debug.core.zend.debugger.Debugger.AddFilesResponseHandler fAddFilesResponseHandler;
- protected DefaultExpressionsManager expressionsManager;
-
- // private IVariable[] fVariables;
- protected IProject fProject;
- protected int fSuspendCount;
- protected Vector<IPHPConsoleEventListener> fConsoleEventListeners = new Vector<>();
- protected Set<DebugError> fDebugErrors = new HashSet<>();
- protected StartLock fStartLock = new StartLock();
- protected BreakpointSet fBreakpointSet;
- protected IBreakpointManager fBreakpointManager;
- protected boolean fIsServerWindows = false;
- protected DebugConnection fDebugConnection;
- protected Set<String> fAddFilesPaths;
+ private PHPThread fThread;
+ private IThread[] fThreads;
+ private IRemoteDebugger debugger;
+ private String fLastcmd;
+ private boolean fStatus;
+ private int fLastStop;
+ private String fLastFileName;
+ private boolean fIsPHPCGI;
+ private boolean fIsRunAsDebug;
+
+ private PHPResponseHandler fPHPResponseHandler;
+ private org.eclipse.php.internal.debug.core.zend.debugger.Debugger.StartResponseHandler fStartResponseHandler;
+ private org.eclipse.php.internal.debug.core.zend.debugger.Debugger.BreakpointAddedResponseHandler fBreakpointAddedResponseHandler;
+ private org.eclipse.php.internal.debug.core.zend.debugger.Debugger.BreakpointRemovedResponseHandler fBreakpointRemovedResponseHandler;
+ private org.eclipse.php.internal.debug.core.zend.debugger.Debugger.StepIntoResponseHandler fStepIntoResponseHandler;
+ private org.eclipse.php.internal.debug.core.zend.debugger.Debugger.StepOverResponseHandler fStepOverResponseHandler;
+ private org.eclipse.php.internal.debug.core.zend.debugger.Debugger.StepOutResponseHandler fStepOutResponseHandler;
+ private org.eclipse.php.internal.debug.core.zend.debugger.Debugger.GoResponseHandler fGoResponseHandler;
+ private org.eclipse.php.internal.debug.core.zend.debugger.Debugger.PauseResponseHandler fPauseResponseHandler;
+ private org.eclipse.php.internal.debug.core.zend.debugger.Debugger.AddFilesResponseHandler fAddFilesResponseHandler;
+ private DefaultExpressionsManager expressionsManager;
+
+ private IProject fProject;
+ private int fSuspendCount;
+ private Vector<IPHPConsoleEventListener> fConsoleEventListeners = new Vector<>();
+ private Set<DebugError> fDebugErrors = new HashSet<>();
+ private StartLock fStartLock = new StartLock();
+ private BreakpointSet fBreakpointSet;
+ private IBreakpointManager fBreakpointManager;
+ private boolean fIsServerWindows = false;
+ private DebugConnection fDebugConnection;
+ private Set<String> fAddFilesPaths;
/**
* Constructs a new debug target in the given launch for the associated PHP
* Debugger on a Apache Server.
*
* @param connection
- * The debug connection for the communication read and write
- * processes.
+ * The debug connection for the communication read and
+ * write processes.
* @param launch
- * containing launch
+ * containing launch
* @param URL
- * URL of the debugger
+ * URL of the debugger
* @param requestPort
- * port to send requests to the bebugger *
+ * port to send requests to the bebugger *
* @exception CoreException
- * if unable to connect to host
+ * if unable to connect to host
*/
public PHPDebugTarget(DebugConnection connection, ILaunch launch, String URL, int requestPort, IProcess process,
boolean runAsDebug, boolean stopAtFirstLine, IProject project) throws CoreException {
@@ -139,16 +138,16 @@ public class PHPDebugTarget extends PHPDebugElement
* Debugger using PHP exe.
*
* @param connectionThread
- * The debug connection for the communication read and write
- * processes.
+ * The debug connection for the communication read
+ * and write processes.
* @param launch
- * containing launch
+ * containing launch
* @param String
- * full path to the PHP executable
+ * full path to the PHP executable
* @param requestPort
- * port to send requests to the bebugger *
+ * port to send requests to the bebugger *
* @exception CoreException
- * if unable to connect to host
+ * if unable to connect to host
*/
public PHPDebugTarget(DebugConnection connectionThread, ILaunch launch, String phpExe, IFile fileToDebug,
int requestPort, IProcess process, boolean runAsDebug, boolean stopAtFirstLine, IProject project)
@@ -513,7 +512,7 @@ public class PHPDebugTarget extends PHPDebugElement
* Notification the target has resumed for the given reason
*
* @param detail
- * reason for the resume
+ * reason for the resume
*/
private void resumed(int detail) {
fSuspended = false;
@@ -524,7 +523,7 @@ public class PHPDebugTarget extends PHPDebugElement
* Notification the target has suspended for the given reason
*
* @param detail
- * reason for the suspend
+ * reason for the suspend
*/
public void suspended(int detail) {
fSuspended = true;
@@ -748,7 +747,7 @@ public class PHPDebugTarget extends PHPDebugElement
*
* @return the current stack frames in the target
* @throws DebugException
- * if unable to perform the request
+ * if unable to perform the request
*/
protected IStackFrame[] getStackFrames() throws DebugException {
return fContextManager.getStackFrames();
@@ -771,7 +770,7 @@ public class PHPDebugTarget extends PHPDebugElement
* Step Return the debugger.
*
* @throws DebugException
- * if the request fails
+ * if the request fails
*/
protected void stepReturn() throws DebugException {
fLastcmd = "stepReturn"; //$NON-NLS-1$
@@ -790,7 +789,7 @@ public class PHPDebugTarget extends PHPDebugElement
* Step Over the debugger.
*
* @throws DebugException
- * if the request fails
+ * if the request fails
*/
protected void stepOver() throws DebugException {
fLastcmd = "stepOver"; //$NON-NLS-1$
@@ -809,7 +808,7 @@ public class PHPDebugTarget extends PHPDebugElement
* Step Into the debugger.
*
* @throws DebugException
- * if the request fails
+ * if the request fails
*/
protected void stepInto() throws DebugException {
Logger.debugMSG("PHPDebugTarget: stepInto "); //$NON-NLS-1$
@@ -838,7 +837,7 @@ public class PHPDebugTarget extends PHPDebugElement
* and fire a suspend event.
*
* @param event
- * debug event
+ * debug event
*/
public void breakpointHit(String fileName, int lineNumber) {
// determine which breakpoint was hit, and set the thread's breakpoint
@@ -856,9 +855,9 @@ public class PHPDebugTarget extends PHPDebugElement
* Finds the breakpoint hit
*
* @param fileName
- * Filename containing the breakpoint
+ * Filename containing the breakpoint
* @param lineNumber
- * Linenumber of breakpoint
+ * Linenumber of breakpoint
* @return the Local Variabales for the target
*
*/
@@ -886,7 +885,7 @@ public class PHPDebugTarget extends PHPDebugElement
* Finds the breakpoint hit
*
* @param enabled
- * Enabled or Disable breakpoints.
+ * Enabled or Disable breakpoints.
*
*/
@Override
@@ -911,7 +910,7 @@ public class PHPDebugTarget extends PHPDebugElement
* registered.
*
* @param listener
- * event listener
+ * event listener
*/
public void addConsoleEventListener(IPHPConsoleEventListener listener) {
if (!fConsoleEventListeners.contains(listener)) {
@@ -927,7 +926,7 @@ public class PHPDebugTarget extends PHPDebugElement
* currently registered.
*
* @param listener
- * event listener
+ * event listener
*/
public void removeConsoleEventListener(IPHPConsoleEventListener listener) {
fConsoleEventListeners.remove(listener);
@@ -1050,7 +1049,7 @@ public class PHPDebugTarget extends PHPDebugElement
* Maps first debug file in the path mapper
*
* @param remoteFile
- * Server file path
+ * Server file path
* @return mapped path entry or <code>null</code> in case of error
*/
public PathEntry mapFirstDebugFile(String remoteFile) {
diff --git a/plugins/org.eclipse.php.formatter.ui/src/org/eclipse/php/formatter/ui/preferences/LineWrappingTabPage.java b/plugins/org.eclipse.php.formatter.ui/src/org/eclipse/php/formatter/ui/preferences/LineWrappingTabPage.java
index 4a6974b69..fbf36fac7 100644
--- a/plugins/org.eclipse.php.formatter.ui/src/org/eclipse/php/formatter/ui/preferences/LineWrappingTabPage.java
+++ b/plugins/org.eclipse.php.formatter.ui/src/org/eclipse/php/formatter/ui/preferences/LineWrappingTabPage.java
@@ -53,7 +53,7 @@ public class LineWrappingTabPage extends ModifyDialogTabPage {
/**
* @param _name
- * Category name
+ * Category name
*/
public Category(String _name) {
this(null, null, _name);
@@ -191,7 +191,7 @@ public class LineWrappingTabPage extends ModifyDialogTabPage {
private void evaluateElements(Iterator<Category> iterator) {
while (iterator.hasNext()) {
Category category = iterator.next();
- if (category.children.size() == 0) {
+ if (category.children.isEmpty()) {
if (!fElements.contains(category)) {
fElements.add(category);
}
@@ -219,7 +219,7 @@ public class LineWrappingTabPage extends ModifyDialogTabPage {
private void updateButton(Category category) {
boolean isSelected = Boolean
- .valueOf(codeFormatterPreferences.getMap().get(category.getForceSplitKey()).toString());
+ .parseBoolean(codeFormatterPreferences.getMap().get(category.getForceSplitKey()).toString());
fForceSplit.setSelection(isSelected);
}
@@ -231,11 +231,11 @@ public class LineWrappingTabPage extends ModifyDialogTabPage {
}
}
- protected static final String[] INDENT_NAMES = { FormatterMessages.LineWrappingTabPage_indentation_default,
+ private static final String[] INDENT_NAMES = { FormatterMessages.LineWrappingTabPage_indentation_default,
FormatterMessages.LineWrappingTabPage_indentation_on_column,
FormatterMessages.LineWrappingTabPage_indentation_by_one };
- protected static final String[] WRAPPING_NAMES = { FormatterMessages.LineWrappingTabPage_splitting_do_not_split,
+ private static final String[] WRAPPING_NAMES = { FormatterMessages.LineWrappingTabPage_splitting_do_not_split,
FormatterMessages.LineWrappingTabPage_splitting_wrap_when_necessary, // COMPACT_SPLIT
FormatterMessages.LineWrappingTabPage_splitting_always_wrap_first_others_when_necessary, // COMPACT_FIRST_BREAK_SPLIT
FormatterMessages.LineWrappingTabPage_splitting_wrap_always, // ONE_PER_LINE_SPLIT
@@ -281,7 +281,7 @@ public class LineWrappingTabPage extends ModifyDialogTabPage {
/**
* The default preview line width.
*/
- private static int DEFAULT_PREVIEW_WINDOW_LINE_WIDTH = 40;
+ private static final int DEFAULT_PREVIEW_WINDOW_LINE_WIDTH = 40;
/**
* The key to save the user's preview window width in the dialog settings.
@@ -292,27 +292,26 @@ public class LineWrappingTabPage extends ModifyDialogTabPage {
/**
* The dialog settings.
*/
- protected final IDialogSettings fDialogSettings;
+ private final IDialogSettings fDialogSettings;
- protected TreeViewer fCategoriesViewer;
- protected Label fWrappingStylePolicy;
- protected Combo fWrappingStyleCombo;
- protected Label fIndentStylePolicy;
- protected Combo fIndentStyleCombo;
- protected Button fForceSplit;
+ private TreeViewer fCategoriesViewer;
+ private Label fWrappingStylePolicy;
+ private Combo fWrappingStyleCombo;
+ private Label fIndentStylePolicy;
+ private Combo fIndentStyleCombo;
+ private Button fForceSplit;
- protected CodeFormatterPreview fPreview;
+ private CodeFormatterPreview fPreview;
private NumberPreference fMaxLineWidthPref;
private NumberPreference fDefaultIndentWrapLines;
private CheckboxPreference fTrailingComma;
- // private NumberPreference fPreviewLineWidth;
- protected Group fOptionsGroup;
+ private Group fOptionsGroup;
/**
- * A collection containing the categories tree. This is used as model for
- * the tree viewer.
+ * A collection containing the categories tree. This is used as model for the
+ * tree viewer.
*
* @see TreeViewer
*/
@@ -321,27 +320,27 @@ public class LineWrappingTabPage extends ModifyDialogTabPage {
/**
* The category listener which makes the selection persistent.
*/
- protected final CategoryListener fCategoryListener;
+ private final CategoryListener fCategoryListener;
/**
* The current selection of elements.
*/
- protected IStructuredSelection fSelection;
+ private IStructuredSelection fSelection;
/**
* An object containing the state for the UI.
*/
- SelectionState fSelectionState;
+ private SelectionState fSelectionState;
/**
* A special options store wherein the preview line width is kept.
*/
- protected final Map<String, String> fPreviewPreferences;
+ private final Map<String, String> fPreviewPreferences;
/**
* The key for the preview line width.
*/
- private final String LINE_SPLIT = CodeFormatterConstants.FORMATTER_LINE_SPLIT;
+ private static final String LINE_SPLIT = CodeFormatterConstants.FORMATTER_LINE_SPLIT;
private boolean isInitialized;
diff --git a/plugins/org.eclipse.php.phpunit/src/org/eclipse/php/phpunit/ui/view/PHPUnitView.java b/plugins/org.eclipse.php.phpunit/src/org/eclipse/php/phpunit/ui/view/PHPUnitView.java
index 0cb4d3a80..0f40a89e6 100644
--- a/plugins/org.eclipse.php.phpunit/src/org/eclipse/php/phpunit/ui/view/PHPUnitView.java
+++ b/plugins/org.eclipse.php.phpunit/src/org/eclipse/php/phpunit/ui/view/PHPUnitView.java
@@ -69,9 +69,7 @@ public class PHPUnitView extends ViewPart {
private static final String RERUN_LAST_FAILED_COMMAND = "org.eclipse.php.phpunit.LaunchShortcut.rerunLastFailed"; //$NON-NLS-1$
static final int VIEW_ORIENTATION_AUTOMATIC = 2;
-
static final int VIEW_ORIENTATION_HORIZONTAL = 1;
-
static final int VIEW_ORIENTATION_VERTICAL = 0;
private static PHPUnitView instance = null;
@@ -106,35 +104,22 @@ public class PHPUnitView extends ViewPart {
return instance;
}
- boolean codeCoverageTabVisibile = false;
-
- final Image fCodeCoverageIcon = PHPUnitPlugin.createImage(CodeCoverageSection.CODE_COVERAGE_ICON_PATH);
-
- Image fOriginalViewImage;
+ private boolean codeCoverageTabVisibile = false;
- final Image fStackViewIcon = PHPUnitPlugin.createImage("eview16/stackframe.png");//$NON-NLS-1$
-
- final Image fDiffViewIcon = PHPUnitPlugin.createImage("eview16/diff.png");//$NON-NLS-1$
-
- boolean running = false;
+ private final Image fCodeCoverageIcon = PHPUnitPlugin.createImage(CodeCoverageSection.CODE_COVERAGE_ICON_PATH);
+ private final Image fStackViewIcon = PHPUnitPlugin.createImage("eview16/stackframe.png");//$NON-NLS-1$
+ private final Image fDiffViewIcon = PHPUnitPlugin.createImage("eview16/diff.png");//$NON-NLS-1$
/**
* Whether the output scrolls and reveals tests as they are executed.
*/
- protected boolean fAutoScroll = true;
-
- protected CounterPanel fCounterPanel;
-
- protected ProgressBar fProgressBar;
-
+ private boolean fAutoScroll = true;
+ private CounterPanel fCounterPanel;
+ private ProgressBar fProgressBar;
private CTabFolder bottomTabFolder;
-
private CTabItem codeCoverageTab;
-
private CodeCoverageSection fCodeCoverageSection;
-
private Action fCollapseAllAction;
-
private Composite fCounterComposite;
/**
@@ -150,7 +135,6 @@ public class PHPUnitView extends ViewPart {
/**
* The tab that shows the stack trace of a failure
*/
- // private DiffTrace fDiffTrace;
private FailureTrace fFailureTrace;
/**
@@ -220,7 +204,6 @@ public class PHPUnitView extends ViewPart {
fCounterComposite.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
final SashForm sashForm = createSashForm(parent);
sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
- fOriginalViewImage = getTitleImage();
}
public void handleTestSelected(final PHPUnitElement testInfo) {
@@ -326,8 +309,7 @@ public class PHPUnitView extends ViewPart {
title = filters.get(0);
}
}
- final String configName = MessageFormat.format(PHPUnitMessages.PHPUnitView_Rerun_Config,
- new Object[] { title });
+ final String configName = MessageFormat.format(PHPUnitMessages.PHPUnitView_Rerun_Config, title);
final ILaunchConfigurationWorkingCopy tmp = launchConfiguration.copy(configName);
tmp.setAttribute(PHPUnitLaunchAttributes.ATTRIBUTE_RERUN, true);
@@ -406,7 +388,6 @@ public class PHPUnitView extends ViewPart {
}
public void startRunning(final ILaunch launch, final PHPUnitConnectionListener listener) {
- running = true;
setLaunch(launch);
this.listener = listener;
Display.getDefault().asyncExec(() -> reset());
@@ -445,7 +426,6 @@ public class PHPUnitView extends ViewPart {
if (input != null) {
PHPUnitMessageParser.getInstance().setInProgress(false);
}
- running = false;
}
void computeOrientation() {
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/LocationGroup.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/LocationGroup.java
index 326d5117a..b015c0872 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/LocationGroup.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/LocationGroup.java
@@ -43,16 +43,15 @@ import org.eclipse.swt.widgets.Shell;
* or has been invoked programmatically.
*/
public class LocationGroup extends Observable implements Observer, IStringButtonAdapter, IDialogFieldListener {
- protected final SelectionButtonDialogField fWorkspaceRadio;
- protected final SelectionButtonDialogField fExternalRadio;
- protected final StringButtonDialogField fLocation;
- // protected final ComboDialogField fEnvironment;
+ private final SelectionButtonDialogField fWorkspaceRadio;
+ private final SelectionButtonDialogField fExternalRadio;
+ private final StringButtonDialogField fLocation;
private IEnvironment[] environments;
private String fPreviousExternalLocation;
private int localEnv;
- protected SelectionButtonDialogField fLocalServerRadio;
- protected ComboDialogField fSeverLocationList;
+ private SelectionButtonDialogField fLocalServerRadio;
+ private ComboDialogField fSeverLocationList;
private String[] docRootArray;
private NameGroup fNameGroup;
private Shell shell;
@@ -174,11 +173,6 @@ public class LocationGroup extends Observable implements Observer, IStringButton
}
}
- /*
- * (non-Javadoc)
- *
- * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
- */
@Override
public void update(Observable o, Object arg) {
if (isInWorkspace()) {
@@ -220,7 +214,6 @@ public class LocationGroup extends Observable implements Observer, IStringButton
if (fWorkspaceRadio.isSelected()) {
return EnvironmentManager.getEnvironmentById(LocalEnvironment.ENVIRONMENT_ID);
}
- // return environments[fEnvironment.getSelectionIndex()];
return environments[localEnv];
}
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardFirstPage.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardFirstPage.java
index 5d4676cb8..9c5df7e7d 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardFirstPage.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardFirstPage.java
@@ -79,29 +79,27 @@ public class PHPProjectWizardFirstPage extends WizardPage implements IPHPProject
}
private static final String FILENAME_PROJECT = ".project"; //$NON-NLS-1$
- protected static final String FILENAME_BUILDPATH = ".buildpath"; //$NON-NLS-1$
- protected URI fCurrProjectLocation; // null if location is platform location
+ private static final String FILENAME_BUILDPATH = ".buildpath"; //$NON-NLS-1$
+ private URI fCurrProjectLocation; // null if location is platform location
private boolean fKeepContent;
private boolean fProjectCreated = false;
- private File fDotProjectBackup;
- private File fDotBuildpathBackup;
private Boolean fIsAutobuild;
private static final String PAGE_NAME = NewWizardMessages.ScriptProjectWizardFirstPage_page_title;
public static final String ERROR_MESSAGE = "ErrorMessage"; //$NON-NLS-1$
- protected Validator fPdtValidator;
- protected String fInitialName;
- protected NameGroup fNameGroup;
- protected DetectGroup fDetectGroup;
- protected VersionGroup fVersionGroup;
- protected JavaScriptSupportGroup fJavaScriptSupportGroup;
- protected LayoutGroup fLayoutGroup;
- protected LocationGroup fPHPLocationGroup;
- protected WorkingSetGroup fWorkingSetGroup;
- protected WizardFragment fragment;
+ private Validator fPdtValidator;
+ private String fInitialName;
+ private NameGroup fNameGroup;
+ private DetectGroup fDetectGroup;
+ private VersionGroup fVersionGroup;
+ private JavaScriptSupportGroup fJavaScriptSupportGroup;
+ private LayoutGroup fLayoutGroup;
+ private LocationGroup fPHPLocationGroup;
+ private WorkingSetGroup fWorkingSetGroup;
+ private WizardFragment fragment;
@Override
public void createControl(Composite parent) {
@@ -775,15 +773,15 @@ public class PHPProjectWizardFirstPage extends WizardPage implements IPHPProject
* configured. No natures are added.
*
* @param project
- * The handle of the project to create.
+ * The handle of the project to create.
* @param locationURI
- * The location of the project or <code>null</code> to create the
- * project in the workspace
+ * The location of the project or <code>null</code> to
+ * create the project in the workspace
* @param monitor
- * a progress monitor to report progress or <code>null</code> if
- * progress reporting is not desired
+ * a progress monitor to report progress or
+ * <code>null</code> if progress reporting is not desired
* @throws CoreException
- * if the project couldn't be created
+ * if the project couldn't be created
* @see org.eclipse.core.resources.IProjectDescription#setLocationURI(java.net.URI)
*
*/
@@ -793,18 +791,15 @@ public class PHPProjectWizardFirstPage extends WizardPage implements IPHPProject
}
protected void rememberExistingFiles(URI projectLocation) throws CoreException {
- fDotProjectBackup = null;
- fDotBuildpathBackup = null;
-
IFileStore file = EFS.getStore(projectLocation);
if (file.fetchInfo().exists()) {
IFileStore projectFile = file.getChild(FILENAME_PROJECT);
if (projectFile.fetchInfo().exists()) {
- fDotProjectBackup = createBackup(projectFile, "project-desc"); //$NON-NLS-1$
+ createBackup(projectFile, "project-desc"); //$NON-NLS-1$
}
IFileStore buildpathFile = file.getChild(FILENAME_BUILDPATH);
if (buildpathFile.fetchInfo().exists()) {
- fDotBuildpathBackup = createBackup(buildpathFile, "buildpath-desc"); //$NON-NLS-1$
+ createBackup(buildpathFile, "buildpath-desc"); //$NON-NLS-1$
}
}
}
@@ -934,4 +929,13 @@ public class PHPProjectWizardFirstPage extends WizardPage implements IPHPProject
protected Boolean getIsAutobuild() {
return fIsAutobuild;
}
+
+ protected VersionGroup getVersionGroup() {
+ return fVersionGroup;
+ }
+
+ protected JavaScriptSupportGroup getJavaScriptSupportGroup() {
+ return fJavaScriptSupportGroup;
+ }
+
}
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardSecondPage.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardSecondPage.java
index 363a65758..c062273b1 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardSecondPage.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/PHPProjectWizardSecondPage.java
@@ -217,7 +217,7 @@ public class PHPProjectWizardSecondPage extends CapabilityConfigurationPage impl
configureScriptProject(new SubProgressMonitor(monitor, 30));
// checking and adding JS nature,libs, include path if needed
- if (fFirstPage.fJavaScriptSupportGroup.shouldSupportJavaScript()) {
+ if (fFirstPage.getJavaScriptSupportGroup().shouldSupportJavaScript()) {
addJavaScriptNature(monitor);
}
@@ -451,11 +451,11 @@ public class PHPProjectWizardSecondPage extends CapabilityConfigurationPage impl
}
protected void setPHPLangOptions() {
- if (fFirstPage.fVersionGroup.fDefaultValues.isSelected()) {
+ if (fFirstPage.getVersionGroup().fDefaultValues.isSelected()) {
return;
}
- boolean useASPTags = fFirstPage.fVersionGroup.fConfigurationBlock.getUseAspTagsValue();
- PHPVersion phpVersion = fFirstPage.fVersionGroup.fConfigurationBlock.getPHPVersionValue();
+ boolean useASPTags = fFirstPage.getVersionGroup().fConfigurationBlock.getUseAspTagsValue();
+ PHPVersion phpVersion = fFirstPage.getVersionGroup().fConfigurationBlock.getPHPVersionValue();
ProjectOptions.setSupportingASPTags(useASPTags, getProject());
ProjectOptions.setPHPVersion(phpVersion, getProject());
}
@@ -465,15 +465,15 @@ public class PHPProjectWizardSecondPage extends CapabilityConfigurationPage impl
* configured. No natures are added.
*
* @param project
- * The handle of the project to create.
+ * The handle of the project to create.
* @param locationURI
- * The location of the project or <code>null</code> to create the
- * project in the workspace
+ * The location of the project or <code>null</code> to
+ * create the project in the workspace
* @param monitor
- * a progress monitor to report progress or <code>null</code> if
- * progress reporting is not desired
+ * a progress monitor to report progress or
+ * <code>null</code> if progress reporting is not desired
* @throws CoreException
- * if the project couldn't be created
+ * if the project couldn't be created
* @see org.eclipse.core.resources.IProjectDescription#setLocationURI(java.net.URI)
*
*/