1) Fixed issue #852: Correct matching of closing brace with the according opening...
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpdt / ui / wizards / NewContainerWizardPage.java
index f21bfb6..58fd483 100644 (file)
@@ -15,7 +15,9 @@ import net.sourceforge.phpdt.core.IJavaProject;
 import net.sourceforge.phpdt.core.IPackageFragmentRoot;
 import net.sourceforge.phpdt.core.JavaCore;
 import net.sourceforge.phpdt.core.JavaModelException;
-import net.sourceforge.phpdt.externaltools.internal.ui.StatusInfo;
+// incastrix
+//import net.sourceforge.phpdt.externaltools.internal.ui.StatusInfo;
+import net.sourceforge.phpeclipse.ui.StatusInfo;
 import net.sourceforge.phpdt.internal.ui.viewsupport.IViewPartInputProvider;
 import net.sourceforge.phpdt.internal.ui.wizards.NewWizardMessages;
 import net.sourceforge.phpdt.internal.ui.wizards.dialogfields.DialogField;
@@ -93,35 +95,35 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
         *            the Java element used to compute the initial package fragment
         *            root used as the source folder
         */
-       protected void initContainerPage(IJavaElement elem) {
-               IPackageFragmentRoot initRoot = null;
-               // if (elem != null) {
-               // initRoot= JavaModelUtil.getPackageFragmentRoot(elem);
-               // if (initRoot == null || initRoot.isArchive()) {
-               // IJavaProject jproject= elem.getJavaProject();
-               // if (jproject != null) {
-               // try {
-               // initRoot= null;
-               // if (jproject.exists()) {
-               // IPackageFragmentRoot[] roots= jproject.getPackageFragmentRoots();
-               // for (int i= 0; i < roots.length; i++) {
-               // if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) {
-               // initRoot= roots[i];
-               // break;
-               // }
-               // }
-               // }
-               // } catch (JavaModelException e) {
-               // PHPeclipsePlugin.log(e);
-               // }
-               // if (initRoot == null) {
-               // initRoot= jproject.getPackageFragmentRoot(jproject.getResource());
-               // }
-               // }
-               // }
-               // }
-               // setPackageFragmentRoot(initRoot, true);
-       }
+//     protected void initContainerPage(IJavaElement elem) {
+//             //IPackageFragmentRoot initRoot = null;
+//             // if (elem != null) {
+//             // initRoot= JavaModelUtil.getPackageFragmentRoot(elem);
+//             // if (initRoot == null || initRoot.isArchive()) {
+//             // IJavaProject jproject= elem.getJavaProject();
+//             // if (jproject != null) {
+//             // try {
+//             // initRoot= null;
+//             // if (jproject.exists()) {
+//             // IPackageFragmentRoot[] roots= jproject.getPackageFragmentRoots();
+//             // for (int i= 0; i < roots.length; i++) {
+//             // if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) {
+//             // initRoot= roots[i];
+//             // break;
+//             // }
+//             // }
+//             // }
+//             // } catch (JavaModelException e) {
+//             // PHPeclipsePlugin.log(e);
+//             // }
+//             // if (initRoot == null) {
+//             // initRoot= jproject.getPackageFragmentRoot(jproject.getResource());
+//             // }
+//             // }
+//             // }
+//             // }
+//             // setPackageFragmentRoot(initRoot, true);
+//     }
 
        /**
         * Utility method to inspect a selection to find a Java element.
@@ -221,9 +223,9 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
        /**
         * Sets the focus to the source folder's text field.
         */
-       protected void setFocusOnContainer() {
-               fContainerDialogField.setFocus();
-       }
+//     protected void setFocusOnContainer() {
+//             fContainerDialogField.setFocus();
+//     }
 
        // -------- ContainerFieldAdapter --------
 
@@ -232,7 +234,7 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
 
                // -------- IStringButtonAdapter
                public void changeControlPressed(DialogField field) {
-                       containerChangeControlPressed(field);
+                       //containerChangeControlPressed(field);
                }
 
                // -------- IDialogFieldListener
@@ -241,21 +243,21 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
                }
        }
 
-       private void containerChangeControlPressed(DialogField field) {
-               // take the current jproject as init element of the dialog
-               // IPackageFragmentRoot root= getPackageFragmentRoot();
-               // root= chooseSourceContainer(root);
-               // if (root != null) {
-               // setPackageFragmentRoot(root, true);
-               // }
-       }
+//     private void containerChangeControlPressed(DialogField field) {
+//             // take the current jproject as init element of the dialog
+//             // IPackageFragmentRoot root= getPackageFragmentRoot();
+//             // root= chooseSourceContainer(root);
+//             // if (root != null) {
+//             // setPackageFragmentRoot(root, true);
+//             // }
+//     }
 
        private void containerDialogFieldChanged(DialogField field) {
                if (field == fContainerDialogField) {
                        fContainerStatus = containerChanged();
                }
                // tell all others
-               handleFieldChanged(CONTAINER);
+               //handleFieldChanged(CONTAINER);
        }
 
        // ----------- validation ----------
@@ -292,7 +294,7 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
                                                                                        "NewContainerWizardPage.error.ProjectClosed", proj.getFullPath().toString())); //$NON-NLS-1$
                                        return status;
                                }
-                               IJavaProject jproject = JavaCore.create(proj);
+                               //IJavaProject jproject = JavaCore.create(proj);
                                // fCurrRoot= jproject.getPackageFragmentRoot(res);
                                // if (res.exists()) {
                                // try {
@@ -349,8 +351,8 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
         *            The name of the field that has changed (field id). For the
         *            source folder the field id is <code>CONTAINER</code>
         */
-       protected void handleFieldChanged(String fieldName) {
-       }
+//     protected void handleFieldChanged(String fieldName) {
+//     }
 
        // ---- get ----------------
 
@@ -471,4 +473,4 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
        // }
        // return null;
        // }
-}
+}
\ No newline at end of file