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;
* 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.
/**
* Sets the focus to the source folder's text field.
*/
- protected void setFocusOnContainer() {
- fContainerDialogField.setFocus();
- }
+// protected void setFocusOnContainer() {
+// fContainerDialogField.setFocus();
+// }
// -------- ContainerFieldAdapter --------
// -------- IStringButtonAdapter
public void changeControlPressed(DialogField field) {
- containerChangeControlPressed(field);
+ //containerChangeControlPressed(field);
}
// -------- IDialogFieldListener
}
}
- 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 ----------
"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 {
* 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 ----------------
// }
// return null;
// }
-}
+}
\ No newline at end of file