You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2009/01/05 18:38:31 UTC
svn commit: r731630 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse: ./
src/java/org/apache/ivyde/eclipse/cpcontainer/
src/java/org/apache/ivyde/eclipse/ui/
src/java/org/apache/ivyde/eclipse/ui/preferences/
Author: hibou
Date: Mon Jan 5 09:38:30 2009
New Revision: 731630
URL: http://svn.apache.org/viewvc?rev=731630&view=rev
Log:
IVYDE-151:
- global configuration panel splitted
Added:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java (with props)
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/RetrievePreferencePage.java (with props)
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsPreferencePage.java (with props)
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsEditor.java
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt?rev=731630&r1=731629&r2=731630&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt Mon Jan 5 09:38:30 2009
@@ -9,6 +9,8 @@
- NEW: Allow to manually reload the settings (IVYDE-26)
- NEW: Allow to not trigger full resolve at startup (IVYDE-74)
+- IMPROVE: Split the global configuration panel into sevral ones (IVYDE-151)
+
- FIX: When migrating from ivyde alpha to ivyde beta eclipse is throwing NPE at startup (IVYDE-136) (thanks to Daniel Becheanu)
- FIX: The retrieve configuration doesn't support '*' as accepted types (IVYDE-137) (thanks to Daniel Becheanu)
- FIX: NPE when a project:/// path is used and path does not exist (IVYDE-144)
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml?rev=731630&r1=731629&r2=731630&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml Mon Jan 5 09:38:30 2009
@@ -163,6 +163,24 @@
class="org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage"
id="org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage">
</page>
+ <page
+ category="org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage"
+ class="org.apache.ivyde.eclipse.ui.preferences.ClasspathPreferencePage"
+ id="org.apache.ivyde.eclipse.ui.preferences.ClasspathPreferencePage"
+ name="Classpath">
+ </page>
+ <page
+ category="org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage"
+ class="org.apache.ivyde.eclipse.ui.preferences.RetrievePreferencePage"
+ id="org.apache.ivyde.eclipse.ui.preferences.RetrievePreferencePage"
+ name="Retrieve">
+ </page>
+ <page
+ category="org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage"
+ class="org.apache.ivyde.eclipse.ui.preferences.SettingsPreferencePage"
+ id="org.apache.ivyde.eclipse.ui.preferences.SettingsPreferencePage"
+ name="Settings">
+ </page>
</extension>
<extension
point="org.eclipse.core.runtime.preferences">
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java?rev=731630&r1=731629&r2=731630&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java Mon Jan 5 09:38:30 2009
@@ -29,8 +29,11 @@
import org.apache.ivyde.eclipse.ui.SettingsEditor;
import org.apache.ivyde.eclipse.ui.IvyFilePathText.IvyXmlPathListener;
import org.apache.ivyde.eclipse.ui.SettingsEditor.SettingsEditorListener;
+import org.apache.ivyde.eclipse.ui.preferences.ClasspathPreferencePage;
import org.apache.ivyde.eclipse.ui.preferences.IvyDEPreferenceStoreHelper;
import org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage;
+import org.apache.ivyde.eclipse.ui.preferences.RetrievePreferencePage;
+import org.apache.ivyde.eclipse.ui.preferences.SettingsPreferencePage;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
@@ -131,7 +134,7 @@
if (settingsProjectSpecificButton.getSelection()) {
conf.isSettingsSpecific = true;
conf.ivySettingsPath = settingsEditor.getSettingsPath();
- conf.loadSettingsOnDemand = settingsEditor.isLoadOnDemand();
+ conf.loadSettingsOnDemand = settingsEditor.getLoadOnDemand();
conf.propertyFiles = settingsEditor.getPropertyFiles();
conf.acceptedTypes = acceptedSuffixesTypesComposite.getAcceptedTypes();
conf.sourceTypes = acceptedSuffixesTypesComposite.getSourcesTypes();
@@ -244,7 +247,7 @@
mainGeneralSettingsLink.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(),
- IvyPreferencePage.PEREFERENCE_PAGE_ID, null, null);
+ SettingsPreferencePage.PEREFERENCE_PAGE_ID, null, null);
dialog.open();
}
});
@@ -335,7 +338,7 @@
retrieveGeneralSettingsLink.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(),
- IvyPreferencePage.PEREFERENCE_PAGE_ID, null, null);
+ RetrievePreferencePage.PEREFERENCE_PAGE_ID, null, null);
dialog.open();
}
});
@@ -377,7 +380,7 @@
advancedGeneralSettingsLink.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(),
- IvyPreferencePage.PEREFERENCE_PAGE_ID, null, null);
+ ClasspathPreferencePage.PEREFERENCE_PAGE_ID, null, null);
dialog.open();
}
});
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsEditor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsEditor.java?rev=731630&r1=731629&r2=731630&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsEditor.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsEditor.java Mon Jan 5 09:38:30 2009
@@ -152,7 +152,7 @@
return settingsText.getText();
}
- public boolean isLoadOnDemand() {
+ public boolean getLoadOnDemand() {
return loadOnDemandButton.getSelection();
}
Added: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java?rev=731630&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java (added)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java Mon Jan 5 09:38:30 2009
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse.ui.preferences;
+
+import org.apache.ivyde.eclipse.IvyPlugin;
+import org.apache.ivyde.eclipse.ui.AcceptedSuffixesTypesComposite;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class ClasspathPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ /** the ID of the preference page */
+ public static final String PEREFERENCE_PAGE_ID = "org.apache.ivyde.eclipse.ui.preferences.ClasspathPreferencePage";
+
+ private Button resolveInWorkspaceCheck;
+
+ private Combo alphaOrderCheck;
+
+ private AcceptedSuffixesTypesComposite acceptedSuffixesTypesComposite;
+
+ public ClasspathPreferencePage() {
+ setPreferenceStore(IvyPlugin.getDefault().getPreferenceStore());
+ }
+
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(IvyPlugin.getDefault().getPreferenceStore());
+ }
+
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ // CheckStyle:MagicNumber| OFF
+ composite.setLayout(new GridLayout(3, false));
+ composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+
+ resolveInWorkspaceCheck = new Button(composite, SWT.CHECK);
+ resolveInWorkspaceCheck.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+ false, 3, 1));
+ resolveInWorkspaceCheck.setText("Resolve dependencies in workspace (EXPERIMENTAL)");
+ resolveInWorkspaceCheck
+ .setToolTipText("Will replace jars on the classpath with workspace projects");
+
+ Label label = new Label(composite, SWT.NONE);
+ label.setText("Order of the classpath entries:");
+
+ alphaOrderCheck = new Combo(composite, SWT.READ_ONLY);
+ alphaOrderCheck
+ .setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
+ alphaOrderCheck.setToolTipText("Order of the artifacts in the classpath container");
+ alphaOrderCheck.add("From the ivy.xml");
+ alphaOrderCheck.add("Lexical");
+
+ acceptedSuffixesTypesComposite = new AcceptedSuffixesTypesComposite(composite, SWT.NONE);
+ acceptedSuffixesTypesComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+ true, false, 3, 1));
+
+ // CheckStyle:MagicNumber| ON
+
+ initPreferences();
+
+ return composite;
+ }
+
+ private void initPreferences() {
+ IvyDEPreferenceStoreHelper helper = IvyPlugin.getPreferenceStoreHelper();
+ resolveInWorkspaceCheck.setSelection(helper.isResolveInWorkspace());
+ alphaOrderCheck.select(helper.isAlphOrder() ? 1 : 0);
+ acceptedSuffixesTypesComposite.init(helper.getAcceptedTypes(), helper.getSourceTypes(),
+ helper.getSourceSuffixes(), helper.getJavadocTypes(), helper.getJavadocSuffixes());
+ }
+
+ public boolean performOk() {
+ IvyDEPreferenceStoreHelper helper = IvyPlugin.getPreferenceStoreHelper();
+ helper.setResolveInWorkspace(resolveInWorkspaceCheck.getSelection());
+ helper.setAlphOrder(alphaOrderCheck.getSelectionIndex() == 1);
+ helper.setAcceptedTypes(acceptedSuffixesTypesComposite.getAcceptedTypes());
+ helper.setSourceTypes(acceptedSuffixesTypesComposite.getSourcesTypes());
+ helper.setSourceSuffixes(acceptedSuffixesTypesComposite.getSourceSuffixes());
+ helper.setJavadocTypes(acceptedSuffixesTypesComposite.getJavadocTypes());
+ helper.setJavadocSuffixes(acceptedSuffixesTypesComposite.getJavadocSuffixes());
+ return true;
+ }
+
+ protected void performDefaults() {
+ resolveInWorkspaceCheck.setSelection(PreferenceInitializer.DEFAULT_RESOLVE_IN_WORKSPACE);
+ alphaOrderCheck.select(PreferenceInitializer.DEFAULT_ALPHABETICAL_ORDER ? 1 : 0);
+ acceptedSuffixesTypesComposite.init(PreferenceInitializer.DEFAULT_ACCEPTED_TYPES,
+ PreferenceInitializer.DEFAULT_SOURCES_TYPES,
+ PreferenceInitializer.DEFAULT_SOURCES_SUFFIXES,
+ PreferenceInitializer.DEFAULT_JAVADOC_TYPES,
+ PreferenceInitializer.DEFAULT_JAVADOC_SUFFIXES);
+ }
+}
Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java?rev=731630&r1=731629&r2=731630&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java Mon Jan 5 09:38:30 2009
@@ -20,15 +20,11 @@
import org.apache.ivy.Ivy;
import org.apache.ivyde.eclipse.IvyPlugin;
import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathInitializer;
-import org.apache.ivyde.eclipse.ui.AcceptedSuffixesTypesComposite;
-import org.apache.ivyde.eclipse.ui.RetrieveComposite;
-import org.apache.ivyde.eclipse.ui.SettingsEditor;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
@@ -53,16 +49,6 @@
/** the ID of the preference page */
public static final String PEREFERENCE_PAGE_ID = "org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage";
- private RetrieveComposite retrieveComposite;
-
- private SettingsEditor settingsEditor;
-
- private Button resolveInWorkspaceCheck;
-
- private Combo alphaOrderCheck;
-
- private AcceptedSuffixesTypesComposite acceptedSuffixesTypesComposite;
-
private Text organizationText;
private Text organizationUrlText;
@@ -114,55 +100,12 @@
.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
resolveOnStartupButton.setText("Trigger resolve");
- Group settingsGroup = new Group(composite, SWT.NONE);
- settingsGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
- settingsGroup.setLayout(new GridLayout());
- settingsGroup.setText("Global settings");
-
- settingsEditor = new SettingsEditor(settingsGroup, SWT.NONE);
- settingsEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-
- Group retrieveGroup = new Group(composite, SWT.NONE);
- retrieveGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
- retrieveGroup.setLayout(new GridLayout());
- retrieveGroup.setText("Retrieve configuration");
-
- retrieveComposite = new RetrieveComposite(retrieveGroup, SWT.NONE);
- retrieveComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-
- Group containerGroup = new Group(composite, SWT.NONE);
- containerGroup.setText("Classpath container configuration");
- containerGroup.setLayout(new GridLayout(3, false));
- containerGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-
- resolveInWorkspaceCheck = new Button(containerGroup, SWT.CHECK);
- resolveInWorkspaceCheck.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
- false, 3, 1));
- resolveInWorkspaceCheck.setText("Resolve dependencies in workspace (EXPERIMENTAL)");
- resolveInWorkspaceCheck
- .setToolTipText("Will replace jars on the classpath with workspace projects");
-
- Label label = new Label(containerGroup, SWT.NONE);
- label.setText("Order of the classpath entries:");
-
- alphaOrderCheck = new Combo(containerGroup, SWT.READ_ONLY);
- alphaOrderCheck
- .setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
- alphaOrderCheck.setToolTipText("Order of the artifacts in the classpath container");
- alphaOrderCheck.add("From the ivy.xml");
- alphaOrderCheck.add("Lexical");
-
- acceptedSuffixesTypesComposite = new AcceptedSuffixesTypesComposite(containerGroup,
- SWT.NONE);
- acceptedSuffixesTypesComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
- true, false, 3, 1));
-
Group editorGroup = new Group(composite, SWT.NONE);
editorGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1));
editorGroup.setLayout(new GridLayout(2, false));
editorGroup.setText("Editor information");
- label = new Label(editorGroup, SWT.NONE);
+ Label label = new Label(editorGroup, SWT.NONE);
label.setText("Organisation:");
organizationText = new Text(editorGroup, SWT.SINGLE | SWT.BORDER);
organizationText
@@ -193,21 +136,12 @@
resolveOnStartupButton.setSelection(true);
break;
}
- settingsEditor.init(helper.getIvySettingsPath(), helper.getPropertyFiles(), helper
- .getLoadSettingsOnDemand());
- retrieveComposite.init(helper.getDoRetrieve(), helper.getRetrievePattern(), helper
- .getRetrieveConfs(), helper.getRetrieveTypes(), helper.getRetrieveSync());
- resolveInWorkspaceCheck.setSelection(helper.isResolveInWorkspace());
- alphaOrderCheck.select(helper.isAlphOrder() ? 1 : 0);
- acceptedSuffixesTypesComposite.init(helper.getAcceptedTypes(), helper.getSourceTypes(),
- helper.getSourceSuffixes(), helper.getJavadocTypes(), helper.getJavadocSuffixes());
organizationText.setText(helper.getIvyOrg());
organizationUrlText.setText(helper.getIvyOrgUrl());
}
public boolean performOk() {
IvyDEPreferenceStoreHelper helper = IvyPlugin.getPreferenceStoreHelper();
- helper.setIvySettingsPath(settingsEditor.getSettingsPath());
if (doNothingButton.getSelection()) {
helper.setResolveOnStartup(IvyClasspathInitializer.ON_STARTUP_NOTHING);
} else if (refreshOnStartupButton.getSelection()) {
@@ -215,19 +149,6 @@
} else {
helper.setResolveOnStartup(IvyClasspathInitializer.ON_STARTUP_RESOLVE);
}
- helper.setPropertyFiles(settingsEditor.getPropertyFiles());
- helper.setDoRetrieve(retrieveComposite.isRetrieveEnabled());
- helper.setRetrievePattern(retrieveComposite.getRetrievePattern());
- helper.setRetrieveSync(retrieveComposite.isSyncEnabled());
- helper.setRetrieveConfs(retrieveComposite.getRetrieveConfs());
- helper.setRetrieveTypes(retrieveComposite.getRetrieveTypes());
- helper.setResolveInWorkspace(resolveInWorkspaceCheck.getSelection());
- helper.setAlphOrder(alphaOrderCheck.getSelectionIndex() == 1);
- helper.setAcceptedTypes(acceptedSuffixesTypesComposite.getAcceptedTypes());
- helper.setSourceTypes(acceptedSuffixesTypesComposite.getSourcesTypes());
- helper.setSourceSuffixes(acceptedSuffixesTypesComposite.getSourceSuffixes());
- helper.setJavadocTypes(acceptedSuffixesTypesComposite.getJavadocTypes());
- helper.setJavadocSuffixes(acceptedSuffixesTypesComposite.getJavadocSuffixes());
helper.setOrganization(organizationText.getText());
helper.setOrganizationUrl(organizationUrlText.getText());
return true;
@@ -245,21 +166,6 @@
resolveOnStartupButton.setSelection(true);
break;
}
- settingsEditor.init(PreferenceInitializer.DEFAULT_IVYSETTINGS_PATH,
- PreferenceInitializer.DEFAULT_PROPERTY_FILES,
- PreferenceInitializer.DEFAULT_LOAD_SETTINGS_ON_DEMAND);
- retrieveComposite.init(PreferenceInitializer.DEFAULT_DO_RETRIEVE,
- PreferenceInitializer.DEFAULT_RETRIEVE_PATTERN,
- PreferenceInitializer.DEFAULT_RETRIEVE_CONFS,
- PreferenceInitializer.DEFAULT_RETRIEVE_TYPES,
- PreferenceInitializer.DEFAULT_RETRIEVE_SYNC);
- resolveInWorkspaceCheck.setSelection(PreferenceInitializer.DEFAULT_RESOLVE_IN_WORKSPACE);
- alphaOrderCheck.select(PreferenceInitializer.DEFAULT_ALPHABETICAL_ORDER ? 1 : 0);
- acceptedSuffixesTypesComposite.init(PreferenceInitializer.DEFAULT_ACCEPTED_TYPES,
- PreferenceInitializer.DEFAULT_SOURCES_TYPES,
- PreferenceInitializer.DEFAULT_SOURCES_SUFFIXES,
- PreferenceInitializer.DEFAULT_JAVADOC_TYPES,
- PreferenceInitializer.DEFAULT_JAVADOC_SUFFIXES);
organizationText.setText(PreferenceInitializer.DEFAULT_ORGANISATION);
organizationUrlText.setText(PreferenceInitializer.DEFAULT_ORGANISATION_URL);
}
Added: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/RetrievePreferencePage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/RetrievePreferencePage.java?rev=731630&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/RetrievePreferencePage.java (added)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/RetrievePreferencePage.java Mon Jan 5 09:38:30 2009
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse.ui.preferences;
+
+import org.apache.ivyde.eclipse.IvyPlugin;
+import org.apache.ivyde.eclipse.ui.RetrieveComposite;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class RetrievePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ /** the ID of the preference page */
+ public static final String PEREFERENCE_PAGE_ID = "org.apache.ivyde.eclipse.ui.preferences.RetrievePreferencePage";
+
+ private RetrieveComposite retrieveComposite;
+
+ public RetrievePreferencePage() {
+ setPreferenceStore(IvyPlugin.getDefault().getPreferenceStore());
+ }
+
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(IvyPlugin.getDefault().getPreferenceStore());
+ }
+
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ // CheckStyle:MagicNumber| OFF
+ composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+ composite.setLayout(new GridLayout());
+
+ retrieveComposite = new RetrieveComposite(composite, SWT.NONE);
+ retrieveComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+ // CheckStyle:MagicNumber| ON
+
+ initPreferences();
+
+ return composite;
+ }
+
+ private void initPreferences() {
+ IvyDEPreferenceStoreHelper helper = IvyPlugin.getPreferenceStoreHelper();
+ retrieveComposite.init(helper.getDoRetrieve(), helper.getRetrievePattern(), helper
+ .getRetrieveConfs(), helper.getRetrieveTypes(), helper.getRetrieveSync());
+ }
+
+ public boolean performOk() {
+ IvyDEPreferenceStoreHelper helper = IvyPlugin.getPreferenceStoreHelper();
+ helper.setDoRetrieve(retrieveComposite.isRetrieveEnabled());
+ helper.setRetrievePattern(retrieveComposite.getRetrievePattern());
+ helper.setRetrieveSync(retrieveComposite.isSyncEnabled());
+ helper.setRetrieveConfs(retrieveComposite.getRetrieveConfs());
+ helper.setRetrieveTypes(retrieveComposite.getRetrieveTypes());
+ return true;
+ }
+
+ protected void performDefaults() {
+ retrieveComposite.init(PreferenceInitializer.DEFAULT_DO_RETRIEVE,
+ PreferenceInitializer.DEFAULT_RETRIEVE_PATTERN,
+ PreferenceInitializer.DEFAULT_RETRIEVE_CONFS,
+ PreferenceInitializer.DEFAULT_RETRIEVE_TYPES,
+ PreferenceInitializer.DEFAULT_RETRIEVE_SYNC);
+ }
+}
Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/RetrievePreferencePage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/RetrievePreferencePage.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/RetrievePreferencePage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsPreferencePage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsPreferencePage.java?rev=731630&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsPreferencePage.java (added)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsPreferencePage.java Mon Jan 5 09:38:30 2009
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse.ui.preferences;
+
+import org.apache.ivyde.eclipse.IvyPlugin;
+import org.apache.ivyde.eclipse.ui.SettingsEditor;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class SettingsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ /** the ID of the preference page */
+ public static final String PEREFERENCE_PAGE_ID = "org.apache.ivyde.eclipse.ui.preferences.SettingsPreferencePage";
+
+ private SettingsEditor settingsEditor;
+
+ public SettingsPreferencePage() {
+ setPreferenceStore(IvyPlugin.getDefault().getPreferenceStore());
+ }
+
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(IvyPlugin.getDefault().getPreferenceStore());
+ }
+
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ // CheckStyle:MagicNumber| OFF
+ composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+ composite.setLayout(new GridLayout());
+
+ settingsEditor = new SettingsEditor(composite, SWT.NONE);
+ settingsEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+ // CheckStyle:MagicNumber| ON
+
+ initPreferences();
+
+ return composite;
+ }
+
+ private void initPreferences() {
+ IvyDEPreferenceStoreHelper helper = IvyPlugin.getPreferenceStoreHelper();
+ settingsEditor.init(helper.getIvySettingsPath(), helper.getPropertyFiles(), helper
+ .getLoadSettingsOnDemand());
+ }
+
+ public boolean performOk() {
+ IvyDEPreferenceStoreHelper helper = IvyPlugin.getPreferenceStoreHelper();
+ helper.setIvySettingsPath(settingsEditor.getSettingsPath());
+ helper.setPropertyFiles(settingsEditor.getPropertyFiles());
+ helper.setLoadSettingsOnDemand(settingsEditor.getLoadOnDemand());
+ return true;
+ }
+
+ protected void performDefaults() {
+ settingsEditor.init(PreferenceInitializer.DEFAULT_IVYSETTINGS_PATH,
+ PreferenceInitializer.DEFAULT_PROPERTY_FILES,
+ PreferenceInitializer.DEFAULT_LOAD_SETTINGS_ON_DEMAND);
+ }
+}
Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsPreferencePage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsPreferencePage.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsPreferencePage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain