X-Git-Url: http://secure.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/ui/wizards/NewTypeWizardPage.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/ui/wizards/NewTypeWizardPage.java
index cde654e..50de3fe 100644
--- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/ui/wizards/NewTypeWizardPage.java
+++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/ui/wizards/NewTypeWizardPage.java
@@ -28,9 +28,9 @@ import net.sourceforge.phpdt.core.compiler.InvalidInputException;
//import net.sourceforge.phpdt.externaltools.internal.ui.StatusInfo;
import net.sourceforge.phpeclipse.ui.StatusInfo;
import net.sourceforge.phpdt.internal.corext.codemanipulation.StubUtility;
-import net.sourceforge.phpdt.internal.corext.template.php.JavaContext;
-import net.sourceforge.phpdt.internal.corext.template.php.Templates;
-import net.sourceforge.phpdt.internal.corext.util.JavaModelUtil;
+//import net.sourceforge.phpdt.internal.corext.template.php.JavaContext;
+//import net.sourceforge.phpdt.internal.corext.template.php.Templates;
+//import net.sourceforge.phpdt.internal.corext.util.JavaModelUtil;
import net.sourceforge.phpdt.internal.ui.PHPUiImages;
import net.sourceforge.phpdt.internal.ui.util.SWTUtil;
import net.sourceforge.phpdt.internal.ui.wizards.NewWizardMessages;
@@ -46,9 +46,9 @@ import net.sourceforge.phpdt.internal.ui.wizards.dialogfields.Separator;
import net.sourceforge.phpdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
import net.sourceforge.phpdt.internal.ui.wizards.dialogfields.StringButtonStatusDialogField;
import net.sourceforge.phpdt.internal.ui.wizards.dialogfields.StringDialogField;
-import net.sourceforge.phpdt.ui.CodeGeneration;
-import net.sourceforge.phpdt.ui.PreferenceConstants;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+//import net.sourceforge.phpdt.ui.CodeGeneration;
+//import net.sourceforge.phpdt.ui.PreferenceConstants;
+//import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -56,9 +56,9 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
//import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateException;
+//import org.eclipse.jface.text.BadLocationException;
+//import org.eclipse.jface.text.templates.Template;
+//import org.eclipse.jface.text.templates.TemplateException;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -702,7 +702,7 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
* @see net.sourceforge.phpdt.ui.wizards.NewContainerWizardPage#handleFieldChanged(String)
*/
protected void handleFieldChanged(String fieldName) {
- super.handleFieldChanged(fieldName);
+ //super.handleFieldChanged(fieldName);
if (fieldName == CONTAINER) {
fPackageStatus = packageChanged();
// fEnclosingTypeStatus= enclosingTypeChanged();
@@ -728,9 +728,9 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
*
* @return the text of the enclosing type input field
*/
- public String getEnclosingTypeText() {
- return fEnclosingTypeDialogField.getText();
- }
+// public String getEnclosingTypeText() {
+// return fEnclosingTypeDialogField.getText();
+// }
/**
* Returns the package fragment corresponding to the current input.
@@ -853,27 +853,27 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
* @return the selected modifiers
* @see Flags
*/
- public int getModifiers() {
- int mdf = 0;
- if (fAccMdfButtons.isSelected(PUBLIC_INDEX)) {
- mdf += F_PUBLIC;
- } else if (fAccMdfButtons.isSelected(PRIVATE_INDEX)) {
- mdf += F_PRIVATE;
- } else if (fAccMdfButtons.isSelected(PROTECTED_INDEX)) {
- mdf += F_PROTECTED;
- }
- // if (fOtherMdfButtons.isSelected(ABSTRACT_INDEX) && (fStaticMdfIndex
- // != 0)) {
- // mdf+= F_ABSTRACT;
- // }
- if (fOtherMdfButtons.isSelected(FINAL_INDEX)) {
- mdf += F_FINAL;
- }
- if (fOtherMdfButtons.isSelected(fStaticMdfIndex)) {
- mdf += F_STATIC;
- }
- return mdf;
- }
+// public int getModifiers() {
+// int mdf = 0;
+// if (fAccMdfButtons.isSelected(PUBLIC_INDEX)) {
+// mdf += F_PUBLIC;
+// } else if (fAccMdfButtons.isSelected(PRIVATE_INDEX)) {
+// mdf += F_PRIVATE;
+// } else if (fAccMdfButtons.isSelected(PROTECTED_INDEX)) {
+// mdf += F_PROTECTED;
+// }
+// // if (fOtherMdfButtons.isSelected(ABSTRACT_INDEX) && (fStaticMdfIndex
+// // != 0)) {
+// // mdf+= F_ABSTRACT;
+// // }
+// if (fOtherMdfButtons.isSelected(FINAL_INDEX)) {
+// mdf += F_FINAL;
+// }
+// if (fOtherMdfButtons.isSelected(fStaticMdfIndex)) {
+// mdf += F_STATIC;
+// }
+// return mdf;
+// }
/**
* Sets the modifiers.
@@ -887,38 +887,38 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
* otherwise they are read-only
* @see Flags
*/
- public void setModifiers(int modifiers, boolean canBeModified) {
- if (Flags.isPublic(modifiers)) {
- fAccMdfButtons.setSelection(PUBLIC_INDEX, true);
- } else if (Flags.isPrivate(modifiers)) {
- fAccMdfButtons.setSelection(PRIVATE_INDEX, true);
- } else if (Flags.isProtected(modifiers)) {
- fAccMdfButtons.setSelection(PROTECTED_INDEX, true);
- } else {
- fAccMdfButtons.setSelection(DEFAULT_INDEX, true);
- }
- // if (Flags.isAbstract(modifiers)) {
- // fOtherMdfButtons.setSelection(ABSTRACT_INDEX, true);
- // }
- if (Flags.isFinal(modifiers)) {
- fOtherMdfButtons.setSelection(FINAL_INDEX, true);
- }
- if (Flags.isStatic(modifiers)) {
- fOtherMdfButtons.setSelection(fStaticMdfIndex, true);
- }
-
- fAccMdfButtons.setEnabled(canBeModified);
- fOtherMdfButtons.setEnabled(canBeModified);
- }
+// public void setModifiers(int modifiers, boolean canBeModified) {
+// if (Flags.isPublic(modifiers)) {
+// fAccMdfButtons.setSelection(PUBLIC_INDEX, true);
+// } else if (Flags.isPrivate(modifiers)) {
+// fAccMdfButtons.setSelection(PRIVATE_INDEX, true);
+// } else if (Flags.isProtected(modifiers)) {
+// fAccMdfButtons.setSelection(PROTECTED_INDEX, true);
+// } else {
+// fAccMdfButtons.setSelection(DEFAULT_INDEX, true);
+// }
+// // if (Flags.isAbstract(modifiers)) {
+// // fOtherMdfButtons.setSelection(ABSTRACT_INDEX, true);
+// // }
+// if (Flags.isFinal(modifiers)) {
+// fOtherMdfButtons.setSelection(FINAL_INDEX, true);
+// }
+// if (Flags.isStatic(modifiers)) {
+// fOtherMdfButtons.setSelection(fStaticMdfIndex, true);
+// }
+//
+// fAccMdfButtons.setEnabled(canBeModified);
+// fOtherMdfButtons.setEnabled(canBeModified);
+// }
/**
* Returns the content of the superclass input field.
*
* @return the superclass name
*/
- public String getSuperClass() {
- return fSuperClassDialogField.getText();
- }
+// public String getSuperClass() {
+// return fSuperClassDialogField.getText();
+// }
/**
* Sets the super class name.
@@ -940,9 +940,9 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
* @return a list of chosen super interfaces. The list's elements are of
* type String
*/
- public List getSuperInterfaces() {
- return fSuperInterfacesDialogField.getElements();
- }
+// public List getSuperInterfaces() {
+// return fSuperInterfacesDialogField.getElements();
+// }
/**
* Sets the super interfaces.
@@ -1798,36 +1798,36 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
* @return the type comment or null
if a type comment is not
* desired
*/
- protected String getTypeComment(ICompilationUnit parentCU) {
- if (PreferenceConstants.getPreferenceStore().getBoolean(
- PreferenceConstants.CODEGEN_ADD_COMMENTS)) {
- try {
- StringBuffer typeName = new StringBuffer();
- if (isEnclosingTypeSelected()) {
- typeName.append(
- JavaModelUtil
- .getTypeQualifiedName(getEnclosingType()))
- .append('.');
- }
- typeName.append(getTypeName());
- String comment = CodeGeneration.getTypeComment(parentCU,
- typeName.toString(), String.valueOf('\n'));
- if (comment != null && isValidComment(comment)) {
- return comment;
- }
- } catch (CoreException e) {
- PHPeclipsePlugin.log(e);
- }
- }
- return null;
- }
+// protected String getTypeComment(ICompilationUnit parentCU) {
+// if (PreferenceConstants.getPreferenceStore().getBoolean(
+// PreferenceConstants.CODEGEN_ADD_COMMENTS)) {
+// try {
+// StringBuffer typeName = new StringBuffer();
+// if (isEnclosingTypeSelected()) {
+// typeName.append(
+// JavaModelUtil
+// .getTypeQualifiedName(getEnclosingType()))
+// .append('.');
+// }
+// typeName.append(getTypeName());
+// String comment = CodeGeneration.getTypeComment(parentCU,
+// typeName.toString(), String.valueOf('\n'));
+// if (comment != null && isValidComment(comment)) {
+// return comment;
+// }
+// } catch (CoreException e) {
+// PHPeclipsePlugin.log(e);
+// }
+// }
+// return null;
+// }
/**
* @deprecated Use getTemplate(String,ICompilationUnit,int)
*/
- protected String getTemplate(String name, ICompilationUnit parentCU) {
- return getTemplate(name, parentCU, 0);
- }
+// protected String getTemplate(String name, ICompilationUnit parentCU) {
+// return getTemplate(name, parentCU, 0);
+// }
/**
* Returns the string resulting from evaluation the given template in the
@@ -1844,24 +1844,24 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
* a source offset into the parent compilation unit. The template
* is evalutated at the given source offset
*/
- protected String getTemplate(String name, ICompilationUnit parentCU, int pos) {
- try {
- Template[] templates = Templates.getInstance().getTemplates(name);
- if (templates.length > 0) {
- return JavaContext
- .evaluateTemplate(templates[0], parentCU, pos);
- }
- } catch (CoreException e) {
- PHPeclipsePlugin.log(e);
- } catch (BadLocationException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (TemplateException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- return null;
- }
+// protected String getTemplate(String name, ICompilationUnit parentCU, int pos) {
+// try {
+// Template[] templates = Templates.getInstance().getTemplates(name);
+// if (templates.length > 0) {
+// return JavaContext
+// .evaluateTemplate(templates[0], parentCU, pos);
+// }
+// } catch (CoreException e) {
+// PHPeclipsePlugin.log(e);
+// } catch (BadLocationException e1) {
+// // TODO Auto-generated catch block
+// e1.printStackTrace();
+// } catch (TemplateException e1) {
+// // TODO Auto-generated catch block
+// e1.printStackTrace();
+// }
+// return null;
+// }
/**
* @deprecated Use
@@ -1954,4 +1954,4 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
// }
// };
// }
-}
+}
\ No newline at end of file