From: khartlage Date: Thu, 30 Jan 2003 19:37:22 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.phpeclipse.com *** empty log message *** --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/LoadPathEntry.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/LoadPathEntry.java index 9008abf..e908153 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/LoadPathEntry.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/LoadPathEntry.java @@ -4,35 +4,35 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IPath; public class LoadPathEntry { - public static final String TYPE_PROJECT = "project"; - - protected IProject project; - protected String type; - - public LoadPathEntry(IProject aProjectEntry) { - project = aProjectEntry; - type = TYPE_PROJECT; - } - - public IPath getPath() { - return project.getFullPath(); - } - - public IProject getProject() { - return project; - } - - public String getType() { - return type; - } - - public String toXML() { - StringBuffer buffer = new StringBuffer(); - - buffer.append(""); - - return buffer.toString(); - } + public static final String TYPE_PROJECT = "project"; + + protected IProject project; + protected String type; + + public LoadPathEntry(IProject aProjectEntry) { + project = aProjectEntry; + type = TYPE_PROJECT; + } + + public IPath getPath() { + return project.getFullPath(); + } + + public IProject getProject() { + return project; + } + + public String getType() { + return type; + } + + public String toXML() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(""); + + return buffer.toString(); + } } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPLanguagePreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPLanguagePreferencePage.java index fed2faf..e7f13b3 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPLanguagePreferencePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPLanguagePreferencePage.java @@ -17,60 +17,59 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; -public class PHPLanguagePreferencePage extends PreferencePage implements IWorkbenchPreferencePage { - private ArrayList RadioButtons = new ArrayList(); +public class PHPLanguagePreferencePage extends PreferencePage implements IWorkbenchPreferencePage { + private ArrayList RadioButtons = new ArrayList(); - protected Control createContents(Composite parent) { - Composite lingoComposite= new Composite(parent, SWT.NULL); - lingoComposite.setLayout(new GridLayout()); - Group lingoGroup= new Group(lingoComposite, SWT.NONE); - lingoGroup.setText(PHPPreferencesMessages.getString("PHPLanguagePreferencePage.preflingo")); - lingoGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - lingoGroup.setLayout(new GridLayout()); - Label lg = new Label(lingoGroup, SWT.WRAP); - lg.setText(PHPPreferencesMessages.getString("PHPLanguagePreferencePage.choose")); - addRadioButton(lingoGroup, PHPPreferencesMessages.getString("PHPLanguagePreferencePage.english"), IPreferenceConstants.RESOURCE_BUNDLE, IPreferenceConstants.RESOURCE_BUNDLE_EN_GB); //$NON-NLS-1$ - addRadioButton(lingoGroup, PHPPreferencesMessages.getString("PHPLanguagePreferencePage.german"), IPreferenceConstants.RESOURCE_BUNDLE, IPreferenceConstants.RESOURCE_BUNDLE_DE); //$NON-NLS-1$ - addRadioButton(lingoGroup, PHPPreferencesMessages.getString("PHPLanguagePreferencePage.french"), IPreferenceConstants.RESOURCE_BUNDLE, IPreferenceConstants.RESOURCE_BUNDLE_FR); //$NON-NLS-1$ - return lingoComposite; - } - public void init(IWorkbench arg0) { - } - private Button addRadioButton(Composite parent, String label, String key, String value) { - GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); - Button button= new Button(parent, SWT.RADIO); - button.setText(label); - button.setData(new String[] { key, value }); - button.setLayoutData(gd); - button.setSelection(value.equals(PHPeclipsePlugin.getDefault().getPreferenceStore().getString(key))); - RadioButtons.add(button); - return button; - } - - protected void performDefaults() { - IPreferenceStore store= getPreferenceStore(); - for (int i= 0; i < RadioButtons.size(); i++) { - Button button= (Button) RadioButtons.get(i); - String[] info= (String[]) button.getData(); - button.setSelection(info[1].equals(store.getDefaultString(info[0]))); - } - super.performDefaults(); - } + protected Control createContents(Composite parent) { + Composite lingoComposite = new Composite(parent, SWT.NULL); + lingoComposite.setLayout(new GridLayout()); + Group lingoGroup = new Group(lingoComposite, SWT.NONE); + lingoGroup.setText(PHPPreferencesMessages.getString("PHPLanguagePreferencePage.preflingo")); + lingoGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + lingoGroup.setLayout(new GridLayout()); + Label lg = new Label(lingoGroup, SWT.WRAP); + lg.setText(PHPPreferencesMessages.getString("PHPLanguagePreferencePage.choose")); + addRadioButton(lingoGroup, PHPPreferencesMessages.getString("PHPLanguagePreferencePage.english"), IPreferenceConstants.RESOURCE_BUNDLE, IPreferenceConstants.RESOURCE_BUNDLE_EN_GB); //$NON-NLS-1$ + addRadioButton(lingoGroup, PHPPreferencesMessages.getString("PHPLanguagePreferencePage.german"), IPreferenceConstants.RESOURCE_BUNDLE, IPreferenceConstants.RESOURCE_BUNDLE_DE); //$NON-NLS-1$ + addRadioButton(lingoGroup, PHPPreferencesMessages.getString("PHPLanguagePreferencePage.french"), IPreferenceConstants.RESOURCE_BUNDLE, IPreferenceConstants.RESOURCE_BUNDLE_FR); //$NON-NLS-1$ + return lingoComposite; + } + public void init(IWorkbench arg0) { + } + private Button addRadioButton(Composite parent, String label, String key, String value) { + GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); + Button button = new Button(parent, SWT.RADIO); + button.setText(label); + button.setData(new String[] { key, value }); + button.setLayoutData(gd); + button.setSelection(value.equals(PHPeclipsePlugin.getDefault().getPreferenceStore().getString(key))); + RadioButtons.add(button); + return button; + } - public boolean performOk() { - IPreferenceStore store= PHPeclipsePlugin.getDefault().getPreferenceStore(); - for (int i= 0; i < RadioButtons.size(); i++) { - Button button= (Button) RadioButtons.get(i); - if (button.getSelection()) { - String[] info= (String[]) button.getData(); - store.setValue(info[0], info[1]); - } - } - PHPeclipsePlugin.getDefault().savePluginPreferences(); - PHPPreferencesMessages.setResourceBundle( - PHPeclipsePlugin.getDefault().getPreferenceStore().getString(IPreferenceConstants.RESOURCE_BUNDLE)); - - return super.performOk(); - } -} + protected void performDefaults() { + IPreferenceStore store = getPreferenceStore(); + for (int i = 0; i < RadioButtons.size(); i++) { + Button button = (Button) RadioButtons.get(i); + String[] info = (String[]) button.getData(); + button.setSelection(info[1].equals(store.getDefaultString(info[0]))); + } + super.performDefaults(); + } + + public boolean performOk() { + IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); + for (int i = 0; i < RadioButtons.size(); i++) { + Button button = (Button) RadioButtons.get(i); + if (button.getSelection()) { + String[] info = (String[]) button.getData(); + store.setValue(info[0], info[1]); + } + } + PHPeclipsePlugin.getDefault().savePluginPreferences(); + PHPPreferencesMessages.setResourceBundle( + PHPeclipsePlugin.getDefault().getPreferenceStore().getString(IPreferenceConstants.RESOURCE_BUNDLE)); + return super.performOk(); + } +} diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPPerspectiveFactory.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPPerspectiveFactory.java index cc41bb1..0278f22 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPPerspectiveFactory.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPPerspectiveFactory.java @@ -1,4 +1,3 @@ - package net.sourceforge.phpeclipse; import org.eclipse.debug.ui.IDebugUIConstants; @@ -8,41 +7,41 @@ import org.eclipse.ui.IPerspectiveFactory; public class PHPPerspectiveFactory implements IPerspectiveFactory { - public PHPPerspectiveFactory() { - super(); - } + public PHPPerspectiveFactory() { + super(); + } + + public void createInitialLayout(IPageLayout layout) { + String editorArea = layout.getEditorArea(); - public void createInitialLayout(IPageLayout layout) { - String editorArea = layout.getEditorArea(); - -// IFolderLayout phpResourcesArea = layout.createFolder("phpresourcesarea", IPageLayout.LEFT, (float)0.25, editorArea); -// phpResourcesArea.addView(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID); - IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$ + // IFolderLayout phpResourcesArea = layout.createFolder("phpresourcesarea", IPageLayout.LEFT, (float)0.25, editorArea); + // phpResourcesArea.addView(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID); + IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$ folder.addView(IPageLayout.ID_RES_NAV); folder.addPlaceholder(IPageLayout.ID_RES_NAV); - - IFolderLayout consoleArea = layout.createFolder("consoleArea", IPageLayout.BOTTOM, (float)0.75, editorArea); - - consoleArea.addView(IPageLayout.ID_TASK_LIST); + + IFolderLayout consoleArea = layout.createFolder("consoleArea", IPageLayout.BOTTOM, (float) 0.75, editorArea); + + consoleArea.addView(IPageLayout.ID_TASK_LIST); consoleArea.addView(IDebugUIConstants.ID_CONSOLE_VIEW); consoleArea.addView(IPageLayout.ID_BOOKMARKS); - - layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float)0.75, editorArea); - - layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); - - layout.addShowViewShortcut(IDebugUIConstants.ID_CONSOLE_VIEW); - - layout.addShowViewShortcut(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID); - + + layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea); + + layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); + + layout.addShowViewShortcut(IDebugUIConstants.ID_CONSOLE_VIEW); + + layout.addShowViewShortcut(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID); + // views - standard workbench layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS); - + // new actions - PHP project creation wizards - layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$ - layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$ - } + layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); //$NON-NLS-1$ + layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); //$NON-NLS-1$ + } } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPSyntaxEditorPreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPSyntaxEditorPreferencePage.java index 22b06ff..55c03c5 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPSyntaxEditorPreferencePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPSyntaxEditorPreferencePage.java @@ -196,7 +196,7 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo gd.horizontalAlignment = GridData.BEGINNING; gd.horizontalSpan = 2; BoldCheckBox.setLayoutData(gd); - + ItalicCheckBox = new Button(stylesComposite, SWT.CHECK); ItalicCheckBox.setText(PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.italic")); //$NON-NLS-1$ ItalicCheckBox.setEnabled(false); @@ -204,7 +204,7 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo gd.horizontalAlignment = GridData.BEGINNING; gd.horizontalSpan = 2; ItalicCheckBox.setLayoutData(gd); - + UnderlineCheckBox = new Button(stylesComposite, SWT.CHECK); UnderlineCheckBox.setText(PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.underline")); //$NON-NLS-1$ UnderlineCheckBox.setEnabled(false); @@ -353,7 +353,7 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo syntaxGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); syntaxGroup.setLayout(layout); createSyntaxPage(syntaxGroup); - + initialize(); return composite; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java index 0cb4ae8..b7c6173 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java @@ -313,7 +313,7 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon store.setDefault(PHP_OUTLINE_CLASS, "true"); //$NON-NLS-1$ store.setDefault(PHP_OUTLINE_FUNC, "true"); //$NON-NLS-1$ store.setDefault(PHP_OUTLINE_VAR, "true"); //$NON-NLS-1$ - + TemplatePreferencePage.initDefaults(store); new PHPSyntaxRdr(); //this will initialize the static fields in the syntaxrdr class }