plugin(_de,_en).properties : added license info to productBlurb used in the About popup
ApplicationWorkbenchWindowAdvisor, IPreferenceKeys, TaxonomicEditorGeneralPreferences : removed preference for allowing update checks on startup as this is already provided by rcp
ApplicationWorkbenchWindowAdvisor, ApplicationUtil, P2Util, UpdateHandler : changed setting of default repositories to make sure that they are set on startup
productName=EDIT Taxonomic Editor\r
-productBlurb=EDIT Taxonomic Editor\n\Version: {0}\nBuild Date: {1} CET\n\n\Copyright (C) 2009 EDIT\n\European Distributed Institute of Taxonomy\n\http://www.e-taxonomy.eu\r
-\r
+productBlurb=EDIT Taxonomic Editor\n\Version: {0}\nBuild Date: {1} CET\n\n\\r
+Copyright (C) 2009-2014 EDIT\n\European Distributed Institute of Taxonomy \n\\r
+http://cybertaxonomy.eu/ \n\n\\r
+The contents of this product are subject to the Mozilla Public License Version 1.1, \n\\r
+you may not use this product except in compliance with the License. \n\\r
+You may obtain a copy of the License at http://www.mozilla.org/MPL/ \n\\r
+Software distributed under the License is distributed on an 'AS IS' basis, \n\\r
+WITHOUT WARRANTY OF ANY KIND, either express or implied. \n\\r
+See the License for the specific language governing rights and limitations under \n\\r
+the License.\r
extension.name = Taxonomic Editor\r
perspective.name = Taxonomic\r
perspective.name.0 = Polytomous Key\r
productName=EDIT Taxonomischer Editor
-productBlurb=EDIT Taxonomischer Editor\n\Version: {0}\nBuild Date: {1} CET\n\n\Copyright (C) 2009 EDIT\n\European Distributed Institute of Taxonomy\n\http://www.e-taxonomy.eu
-
+productBlurb=EDIT Taxonomischer Editor\n\Version: {0}\nBuild Date: {1} CET\n\n\
+Copyright (C) 2009-2014 EDIT\n\European Distributed Institute of Taxonomy \n\
+http://cybertaxonomy.eu/ \n\n\
+The contents of this product are subject to the Mozilla Public License Version 1.1 \n\
+you may not use this product except in compliance with the License. \n\
+You may obtain a copy of the License at http://www.mozilla.org/MPL/ \n\
+Software distributed under the License is distributed on an 'AS IS' basis, \n\
+WITHOUT WARRANTY OF ANY KIND, either express or implied. \n\
+See the License for the specific language governing rights and limitations under \n\
+the License.
extension.name = Taxonomischer Editor
perspective.name = Taxonomisch
perspective.name.0 = Polytomer Key
productName=EDIT Taxonomic Editor\r
-productBlurb=EDIT Taxonomic Editor\n\Version: {0}\nBuild Date: {1} CET\n\n\Copyright (C) 2009 EDIT\n\European Distributed Institute of Taxonomy\n\http://www.e-taxonomy.eu\r
-\r
+productBlurb=EDIT Taxonomic Editor\n\Version: {0}\nBuild Date: {1} CET\n\n\\r
+Copyright (C) 2009-2014 EDIT\n\European Distributed Institute of Taxonomy \n\\r
+http://cybertaxonomy.eu/ \n\n\\r
+The contents of this product are subject to the Mozilla Public License Version 1.1 \n\\r
+you may not use this product except in compliance with the License. \n\\r
+You may obtain a copy of the License at http://www.mozilla.org/MPL/ \n\\r
+Software distributed under the License is distributed on an 'AS IS' basis, \n\\r
+WITHOUT WARRANTY OF ANY KIND, either express or implied. \n\\r
+See the License for the specific language governing rights and limitations under \n\\r
+the License.\r
extension.name = Taxonomic Editor\r
perspective.name = Taxonomic\r
perspective.name.0 = Polytomous Key\r
* @return
*/
public static boolean isStable() {
- return !getVersion().startsWith(BETA_PREFIX);
+ return !getVersion().startsWith("[");
}
/**
* <p>getPluginId</p>
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
CdmStore.connect();
}
+ P2Util.setDefaultUpdateRepositories();
- try {
- if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_AUTO_UPDATE_AT_STARTUP)) {
- P2Util.checkForUpdates();
- }
- } catch (Exception e) {
- MessagingUtils.error(this.getClass(), e);
- }
}
private int authenticate(){
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
+import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.operations.ProvisioningJob;
import org.eclipse.equinox.p2.operations.ProvisioningSession;
import org.eclipse.equinox.p2.operations.Update;
import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.osgi.framework.BundleContext;
//private static String LOCAL_UPDATE_SITE = "file:///path/.../to/Development/EDIT/taxeditor/eu.etaxonomy.taxeditor/target/repository/";
private static String EDIT_NIGHTLY_UPDATE_SITE = "http://cybertaxonomy.eu/download/taxeditor/update/nightly/";
+ private static String EDIT_NIGHTLY_UPDATE_SITE_NAME = "Taxonomic Editor Nightly";
+
private static String EDIT_SNAPSHOT_UPDATE_SITE = "http://cybertaxonomy.eu/download/taxeditor/update/snapshot/";
+ private static String EDIT_SNAPSHOT_UPDATE_SITE_NAME = "Taxonomic Editor Snapshot";
+
private static String EDIT_STABLE_UPDATE_SITE = "http://cybertaxonomy.eu/download/taxeditor/update/stable/";
+ private static String EDIT_STABLE_UPDATE_SITE_NAME = "Taxonomic Editor Stable";
- public static void setUpdateRepositories(UpdateOperation operation) throws URISyntaxException {
+ @SuppressWarnings("restriction")
+ public static void setDefaultUpdateRepositories() {
String updateSite = EDIT_NIGHTLY_UPDATE_SITE;
+ String updateSiteName = EDIT_NIGHTLY_UPDATE_SITE_NAME;
+
if(ApplicationUtil.isStable()) {
updateSite = EDIT_STABLE_UPDATE_SITE;
+ updateSiteName = EDIT_STABLE_UPDATE_SITE_NAME;
}
- operation.getProvisioningContext().setMetadataRepositories(new URI[]{new URI(updateSite)});
- operation.getProvisioningContext().setArtifactRepositories(new URI[]{new URI(updateSite)});
- }
+ try {
+ final MetadataRepositoryElement element = new MetadataRepositoryElement(null, new URI(updateSite), true);
+ element.setNickname(updateSiteName);
+ ElementUtils.updateRepositoryUsingElements(ProvisioningUI.getDefaultUI(),new MetadataRepositoryElement[] {element}, null);
+ } catch (URISyntaxException e) {
+ MessagingUtils.errorDialog("Invalid update site URI",
+ P2Util.class,
+ "The update site URI has an invalid syntax",
+ TaxonomicEditorPlugin.PLUGIN_ID,
+ e,
+ false);
+ }
+ }
+
/**
*
*
// which installable units are being updated, use the more detailed
// constructors.
final UpdateOperation operation = new UpdateOperation(session);
- try {
- setUpdateRepositories(operation);
- } catch (URISyntaxException e) {
- MessagingUtils.errorDialog("Invalid update site URI",
- operation,
- "The update site URI has an invalid syntax",
- TaxonomicEditorPlugin.PLUGIN_ID,
- e,
- false);
- return null;
- }
+// try {
+// setUpdateRepositories(operation);
+// } catch (URISyntaxException e) {
+// MessagingUtils.errorDialog("Invalid update site URI",
+// operation,
+// "The update site URI has an invalid syntax",
+// TaxonomicEditorPlugin.PLUGIN_ID,
+// e,
+// false);
+// return null;
+// }
final IStatus status = operation.resolveModal(monitor);
*******************************************************************************/
package eu.etaxonomy.taxeditor.update;
-import java.net.URISyntaxException;
-
import org.eclipse.equinox.internal.p2.ui.dialogs.UpdateSingleIUWizard;
import org.eclipse.equinox.p2.operations.RepositoryTracker;
import org.eclipse.equinox.p2.operations.UpdateOperation;
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
import org.eclipse.jface.wizard.WizardDialog;
-import eu.etaxonomy.taxeditor.TaxonomicEditorPlugin;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-
/**
* UpdateHandler invokes the check for updates UI
*
@Override
protected void doExecute(LoadMetadataRepositoryJob job) {
-// if (hasNoRepos) {
-// return;
-// }
+ if (hasNoRepos) {
+ return;
+ }
UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
- try {
- P2Util.setUpdateRepositories(operation);
- } catch (URISyntaxException e) {
- MessagingUtils.errorDialog("Invalid update site URI",
- operation,
- "The update site URI has an invalid syntax",
- TaxonomicEditorPlugin.PLUGIN_ID,
- e,
- false);
- return;
- }
+
// check for updates
operation.resolveModal(null);
ws="cocoa,gtk,win32"
arch="x86,x86_64">
- <license url="http://www.eclipse.org/legal/epl-v10.html">
+ <!--license url="http://www.eclipse.org/legal/epl-v10.html">
The contents of this file are subject to the Eclipse Public License Version 1.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.eclipse.org/legal/epl-v10.html
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
- </license>
+ </license-->
<url>
<update label="EDIT Taxonomic Editor" url="http://wp5.e-taxonomy.eu/taxeditor/update"/>
[Enter Copyright Description here.]
</copyright>
- <license url="http://www.mozilla.org/MPL/">
+ <!--license url="http://www.mozilla.org/MPL/">
The contents of this file are subject to the Mozilla Public License Version 1.1 (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.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
- </license>
+ </license-->
<url>
<update label="EDIT Taxonomic Editor" url="http://cybertaxonomy.eu/download/taxeditor/update/"/>
*/
public static final String SHOW_DEBUG_INFORMATION = "eu.etaxonomy.taxeditor.showDebugInformation";
- public static final String ALLOW_AUTO_UPDATE_AT_STARTUP = "eu.etaxonomy.taxeditor.allowAutoUpdateAtStartup";
-
/**
*
*/
addField(new BooleanFieldEditor(IPreferenceKeys.SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS,
"Open search results in separate windows",
getFieldEditorParent()));
- addField(new BooleanFieldEditor(IPreferenceKeys.ALLOW_AUTO_UPDATE_AT_STARTUP,
- "Check for updates when the Editor starts up",
- getFieldEditorParent()));
-
}
/*
<vm>
</vm>
- <license>
+ <!--license>
<url>http://www.mozilla.org/MPL/</url>
<text>
The contents of this file are subject to the Mozilla Public License Version 1.1 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Software distributed under the License is distributed on an &quot;AS IS&quot; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
</text>
- </license>
+ </license -->
<plugins>
</plugins>