topics = MindMapUtils.getAllTopics(sheet, true,
+ true);
+ for (ITopic topic : topics) {
+ topic.setStyleId(null);
+ }
}
}
}
diff --git a/bundles/org.xmind.ui.resources/META-INF/MANIFEST.MF b/bundles/org.xmind.ui.resources/META-INF/MANIFEST.MF
index ad241ac4a..5bd16d10e 100644
--- a/bundles/org.xmind.ui.resources/META-INF/MANIFEST.MF
+++ b/bundles/org.xmind.ui.resources/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.xmind.ui.resources;singleton:=true
-Bundle-Version: 3.7.2.qualifier
+Bundle-Version: 3.7.3.qualifier
Bundle-Vendor: %providerName
Fragment-Host: org.xmind.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/bundles/org.xmind.ui.resources/pom.xml b/bundles/org.xmind.ui.resources/pom.xml
index 99372a712..778f01419 100644
--- a/bundles/org.xmind.ui.resources/pom.xml
+++ b/bundles/org.xmind.ui.resources/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.plugins
org.xmind.ui.resources
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-plugin
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/bundles/org.xmind.ui.spelling/META-INF/MANIFEST.MF b/bundles/org.xmind.ui.spelling/META-INF/MANIFEST.MF
index e93fdbf6a..0262f947e 100644
--- a/bundles/org.xmind.ui.spelling/META-INF/MANIFEST.MF
+++ b/bundles/org.xmind.ui.spelling/META-INF/MANIFEST.MF
@@ -2,15 +2,15 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.xmind.ui.spelling;singleton:=true
-Bundle-Version: 3.7.2.qualifier
+Bundle-Version: 3.7.3.qualifier
Bundle-Activator: org.xmind.ui.internal.spelling.SpellingPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
net.sourceforge.jazzy,
- org.xmind.ui.toolkit;bundle-version="[3.7.2,3.8.0)",
- org.xmind.ui.browser;bundle-version="[3.7.2,3.8.0)",
- org.xmind.core.usagedata;bundle-version="[3.7.2,3.8.0)"
+ org.xmind.ui.toolkit;bundle-version="[3.7.3,3.8.0)",
+ org.xmind.ui.browser;bundle-version="[3.7.3,3.8.0)",
+ org.xmind.core.usagedata;bundle-version="[3.7.3,3.8.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Export-Package: org.xmind.ui,
diff --git a/bundles/org.xmind.ui.spelling/pom.xml b/bundles/org.xmind.ui.spelling/pom.xml
index bd326dda9..8ce7876d4 100644
--- a/bundles/org.xmind.ui.spelling/pom.xml
+++ b/bundles/org.xmind.ui.spelling/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.plugins
org.xmind.ui.spelling
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-plugin
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/bundles/org.xmind.ui.spreadsheet/META-INF/MANIFEST.MF b/bundles/org.xmind.ui.spreadsheet/META-INF/MANIFEST.MF
index b87106e00..41f5b205b 100644
--- a/bundles/org.xmind.ui.spreadsheet/META-INF/MANIFEST.MF
+++ b/bundles/org.xmind.ui.spreadsheet/META-INF/MANIFEST.MF
@@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.xmind.ui.spreadsheet;singleton:=true
-Bundle-Version: 3.7.2.qualifier
+Bundle-Version: 3.7.3.qualifier
Bundle-Activator: org.xmind.ui.internal.spreadsheet.SpreadsheetUIPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.xmind.ui;bundle-version="[3.7.2,3.8.0)",
- org.xmind.ui.toolkit;bundle-version="[3.7.2,3.8.0)",
+ org.xmind.ui;bundle-version="[3.7.3,3.8.0)",
+ org.xmind.ui.toolkit;bundle-version="[3.7.3,3.8.0)",
org.xmind.core.runtime,
org.xmind.core.usagedata
Eclipse-LazyStart: true
diff --git a/bundles/org.xmind.ui.spreadsheet/icons/add_column.svg b/bundles/org.xmind.ui.spreadsheet/icons/add_column.svg
new file mode 100644
index 000000000..5180fda9f
--- /dev/null
+++ b/bundles/org.xmind.ui.spreadsheet/icons/add_column.svg
@@ -0,0 +1,32 @@
+
+
\ No newline at end of file
diff --git a/bundles/org.xmind.ui.spreadsheet/icons/add_row.svg b/bundles/org.xmind.ui.spreadsheet/icons/add_row.svg
new file mode 100644
index 000000000..9ecdbc469
--- /dev/null
+++ b/bundles/org.xmind.ui.spreadsheet/icons/add_row.svg
@@ -0,0 +1,32 @@
+
+
\ No newline at end of file
diff --git a/bundles/org.xmind.ui.spreadsheet/pom.xml b/bundles/org.xmind.ui.spreadsheet/pom.xml
index 8e6246b14..7fc5ae513 100644
--- a/bundles/org.xmind.ui.spreadsheet/pom.xml
+++ b/bundles/org.xmind.ui.spreadsheet/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.plugins
org.xmind.ui.spreadsheet
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-plugin
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/bundles/org.xmind.ui.spreadsheet/src/org/xmind/ui/internal/spreadsheet/AddColumnInfoItemContributor.java b/bundles/org.xmind.ui.spreadsheet/src/org/xmind/ui/internal/spreadsheet/AddColumnInfoItemContributor.java
index c8b06501f..a67659755 100644
--- a/bundles/org.xmind.ui.spreadsheet/src/org/xmind/ui/internal/spreadsheet/AddColumnInfoItemContributor.java
+++ b/bundles/org.xmind.ui.spreadsheet/src/org/xmind/ui/internal/spreadsheet/AddColumnInfoItemContributor.java
@@ -157,6 +157,10 @@ public IAction createAction(ITopicPart topicPart, ITopic topic) {
return null;
}
+ public String getSVGFilePath(ITopic topic, IAction action) {
+ return "platform:/plugin/org.xmind.ui.spreadsheet/icons/add_column.svg"; //$NON-NLS-1$
+ }
+
private boolean isStructureAlgorithmId(IBranchPart branch,
String expectedValue) {
String id = (String) MindMapUtils.getCache(branch,
diff --git a/bundles/org.xmind.ui.spreadsheet/src/org/xmind/ui/internal/spreadsheet/AddRowInfoItemContributor.java b/bundles/org.xmind.ui.spreadsheet/src/org/xmind/ui/internal/spreadsheet/AddRowInfoItemContributor.java
index 123751d0e..0770e72ab 100644
--- a/bundles/org.xmind.ui.spreadsheet/src/org/xmind/ui/internal/spreadsheet/AddRowInfoItemContributor.java
+++ b/bundles/org.xmind.ui.spreadsheet/src/org/xmind/ui/internal/spreadsheet/AddRowInfoItemContributor.java
@@ -153,6 +153,10 @@ public IAction createAction(ITopicPart topicPart, ITopic topic) {
return null;
}
+ public String getSVGFilePath(ITopic topic, IAction action) {
+ return "platform:/plugin/org.xmind.ui.spreadsheet/icons/add_row.svg"; //$NON-NLS-1$
+ }
+
private boolean isStructureAlgorithmId(IBranchPart branch,
String expectedValue) {
String id = (String) MindMapUtils.getCache(branch,
diff --git a/bundles/org.xmind.ui.toolkit/META-INF/MANIFEST.MF b/bundles/org.xmind.ui.toolkit/META-INF/MANIFEST.MF
index 6b93c9dc9..b8b1db57f 100644
--- a/bundles/org.xmind.ui.toolkit/META-INF/MANIFEST.MF
+++ b/bundles/org.xmind.ui.toolkit/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.xmind.ui.toolkit;singleton:=true
-Bundle-Version: 3.7.2.qualifier
+Bundle-Version: 3.7.3.qualifier
Bundle-Activator: org.xmind.ui.internal.ToolkitPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui;visibility:=reexport,
diff --git a/bundles/org.xmind.ui.toolkit/pom.xml b/bundles/org.xmind.ui.toolkit/pom.xml
index a305fc5ad..285357b62 100644
--- a/bundles/org.xmind.ui.toolkit/pom.xml
+++ b/bundles/org.xmind.ui.toolkit/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.plugins
org.xmind.ui.toolkit
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-plugin
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/internal/statushandlers/RuntimeErrorDialog.java b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/internal/statushandlers/RuntimeErrorDialog.java
index d843d65d4..a6ce231dc 100644
--- a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/internal/statushandlers/RuntimeErrorDialog.java
+++ b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/internal/statushandlers/RuntimeErrorDialog.java
@@ -20,6 +20,7 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
@@ -41,7 +42,7 @@ public class RuntimeErrorDialog extends Dialog {
public RuntimeErrorDialog(int style, StatusAdapter statusAdapter,
String dialogTitle, IErrorReporter reporter) {
- super((Shell) null);
+ super(Display.getDefault().getActiveShell());
this.details = new StatusDetails(statusAdapter);
this.dialogTitle = dialogTitle;
this.reporter = reporter == null ? DefaultErrorReporter.getInstance()
diff --git a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/io/DownloadJob.java b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/io/DownloadJob.java
index 4e42b17e7..91cc16c0f 100644
--- a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/io/DownloadJob.java
+++ b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/io/DownloadJob.java
@@ -17,6 +17,7 @@
import java.io.InputStream;
import java.io.InterruptedIOException;
import java.io.OutputStream;
+import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
@@ -35,7 +36,6 @@
* location.
*
* @author Frank Shaka
- *
*/
public class DownloadJob extends Job {
@@ -119,7 +119,6 @@ protected IStatus validateConnection(URLConnection connection) {
/**
* Executes this download job.
- *
*
* This implementation delegates the actual download job to
* {@link #runSafely(IProgressMonitor)} and interprets its exceptions to
@@ -168,17 +167,34 @@ private IStatus runSafely(IProgressMonitor monitor) throws Exception {
URL url = new URL(sourceURL);
URLConnection connection = url.openConnection();
- setURLConnection(connection);
- if (monitor.isCanceled())
- return cancelStatus();
- setupConnection(connection);
- if (monitor.isCanceled())
- return cancelStatus();
+ while (true) {
+ setURLConnection(connection);
+ if (monitor.isCanceled())
+ return cancelStatus();
- connection.connect();
- if (monitor.isCanceled())
- return cancelStatus();
+ setupConnection(connection);
+ if (monitor.isCanceled())
+ return cancelStatus();
+
+ connection.connect();
+ if (monitor.isCanceled())
+ return cancelStatus();
+
+ /// auto redirect
+ int responseCode = ((HttpURLConnection) connection)
+ .getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_MOVED_PERM
+ || responseCode == HttpURLConnection.HTTP_MOVED_TEMP) {
+ String newLocation = connection.getHeaderField("Location"); //$NON-NLS-1$
+ connection = new URL(newLocation).openConnection();
+
+ if (monitor.isCanceled())
+ return cancelStatus();
+ } else {
+ break;
+ }
+ }
IStatus consumed = validateConnection(connection);
if (consumed != null)
@@ -312,4 +328,4 @@ protected void canceling() {
}
}
-}
\ No newline at end of file
+}
diff --git a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/io/WebImageManager.java b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/io/WebImageManager.java
index e7ee04a02..cf34aa715 100644
--- a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/io/WebImageManager.java
+++ b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/io/WebImageManager.java
@@ -16,6 +16,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.xmind.ui.internal.ToolkitPlugin;
+import org.xmind.ui.util.JobPool;
/**
* @author Shawn Liu
@@ -50,7 +51,7 @@ public static interface WebImageCallback {
private WebImageManager() {
}
- public void requestWebImage(final String imageUrl,
+ public void requestWebImage(final String imageUrl, JobPool jobPool,
final WebImageCallback callback) {
if (callback == null) {
return;
@@ -78,7 +79,12 @@ protected IStatus run(IProgressMonitor monitor) {
job.setSystem(true);
job.setUser(false);
- job.schedule();
+
+ if (jobPool != null) {
+ jobPool.scheduleJob(job, null);
+ } else {
+ job.schedule();
+ }
}
private String createWebImageFile(String imageUrl) {
diff --git a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/properties/PropertiesEditor.java b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/properties/PropertiesEditor.java
index 46f7afe12..3a600bb42 100644
--- a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/properties/PropertiesEditor.java
+++ b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/properties/PropertiesEditor.java
@@ -25,6 +25,7 @@
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.util.Util;
import org.eclipse.jface.viewers.IInputSelectionProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -38,10 +39,13 @@
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Point;
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.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.xmind.ui.util.Chainability;
import org.xmind.ui.util.IChained;
@@ -64,8 +68,8 @@ public class PropertiesEditor implements IInputSelectionProvider {
public static final String FONT_ENTRY_SELECTED = "org.xmind.ui.font.PropertiesEditor.entry.selected"; //$NON-NLS-1$
- private static final class Section implements PropertyChangeListener,
- IChained {
+ private static final class Section
+ implements PropertyChangeListener, IChained {
private final PropertiesEditor editor;
@@ -132,8 +136,8 @@ public Iterator entries() {
}
public void propertyChange(java.beans.PropertyChangeEvent evt) {
- if (PropertyEditingSection.PROP_EXPANDED.equals(evt
- .getPropertyName())) {
+ if (PropertyEditingSection.PROP_EXPANDED
+ .equals(evt.getPropertyName())) {
editor.reflow();
}
}
@@ -207,7 +211,8 @@ public ISelection getSelection() {
public void setSelection(ISelection selection) {
}
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ public void addSelectionChangedListener(
+ ISelectionChangedListener listener) {
listeners.add(listener);
}
@@ -223,6 +228,7 @@ public void create(Composite parent) {
container.setExpandVertical(true);
container.setMinWidth(200);
container.setMinHeight(40);
+ addHorizontalScrollSupport(container);
container.addControlListener(new ControlListener() {
public void controlResized(ControlEvent e) {
@@ -247,6 +253,24 @@ public void controlMoved(ControlEvent e) {
refresh();
}
+ // add horizontal scroll support for windows
+ private void addHorizontalScrollSupport(final ScrolledComposite sc) {
+ if (Util.isWindows()) {
+ sc.addListener(SWT.MouseHorizontalWheel, new Listener() {
+
+ public void handleEvent(Event event) {
+ if (!sc.isDisposed()) {
+ int offset = event.count;
+ offset = -(int) (Math.sqrt(Math.abs(offset)) * offset);
+
+ Point origin = sc.getOrigin();
+ sc.setOrigin(origin.x + offset, origin.y);
+ }
+ }
+ });
+ }
+ }
+
public void setColorFontOverrides(String id, String overridedId) {
if (overridedId == null) {
colorFontOverrides.remove(id);
@@ -272,10 +296,11 @@ public void propertyChange(PropertyChangeEvent event) {
String colorId = event.getProperty();
if (getColorFontId(COLOR_BACKGROUND).equals(colorId)) {
updateBackgroundColor();
- } else if (getColorFontId(COLOR_CATEGORY_TITLE).equals(colorId)) {
+ } else if (getColorFontId(COLOR_CATEGORY_TITLE)
+ .equals(colorId)) {
updateCategoryTitlesColor();
- } else if (getColorFontId(COLOR_ENTRY_FOREGROUND).equals(
- colorId)) {
+ } else if (getColorFontId(COLOR_ENTRY_FOREGROUND)
+ .equals(colorId)) {
updateEntriesForegroundColor();
} else if (getColorFontId(COLOR_ENTRY_SELECTED_BACKGROUND)
.equals(colorId)) {
@@ -304,10 +329,10 @@ public void propertyChange(PropertyChangeEvent event) {
JFaceResources.getFontRegistry().addListener(fontChangeListener);
container.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
- JFaceResources.getColorRegistry().removeListener(
- colorChangeListener);
- JFaceResources.getFontRegistry().removeListener(
- fontChangeListener);
+ JFaceResources.getColorRegistry()
+ .removeListener(colorChangeListener);
+ JFaceResources.getFontRegistry()
+ .removeListener(fontChangeListener);
}
});
@@ -326,8 +351,8 @@ protected void updateColorsFonts() {
}
private void updateBackgroundColor() {
- Color color = JFaceResources.getColorRegistry().get(
- getColorFontId(COLOR_BACKGROUND));
+ Color color = JFaceResources.getColorRegistry()
+ .get(getColorFontId(COLOR_BACKGROUND));
container.setBackground(color);
getContents().setBackground(color);
Iterator sections = sections();
@@ -339,8 +364,8 @@ private void updateBackgroundColor() {
}
private void updateCategoryTitlesColor() {
- Color color = JFaceResources.getColorRegistry().get(
- getColorFontId(COLOR_CATEGORY_TITLE));
+ Color color = JFaceResources.getColorRegistry()
+ .get(getColorFontId(COLOR_CATEGORY_TITLE));
Iterator sections = sections();
while (sections.hasNext()) {
Section section = sections.next();
@@ -351,8 +376,8 @@ private void updateCategoryTitlesColor() {
}
private void updateEntriesForegroundColor() {
- Color color = JFaceResources.getColorRegistry().get(
- getColorFontId(COLOR_ENTRY_FOREGROUND));
+ Color color = JFaceResources.getColorRegistry()
+ .get(getColorFontId(COLOR_ENTRY_FOREGROUND));
Iterator entries = entries();
while (entries.hasNext()) {
entries.next().setForeground(color);
@@ -360,8 +385,8 @@ private void updateEntriesForegroundColor() {
}
private void updateCategoryTitlesFont() {
- Font font = JFaceResources.getFontRegistry().get(
- getColorFontId(FONT_CATEGORY_TITLE));
+ Font font = JFaceResources.getFontRegistry()
+ .get(getColorFontId(FONT_CATEGORY_TITLE));
Iterator sections = sections();
while (sections.hasNext()) {
Section section = sections.next();
@@ -372,8 +397,8 @@ private void updateCategoryTitlesFont() {
}
private void updateEntriesFont() {
- Font font = JFaceResources.getFontRegistry().get(
- getColorFontId(FONT_ENTRY));
+ Font font = JFaceResources.getFontRegistry()
+ .get(getColorFontId(FONT_ENTRY));
Iterator entries = entries();
while (entries.hasNext()) {
entries.next().setFont(font);
@@ -381,8 +406,8 @@ private void updateEntriesFont() {
}
private void updateEntriesSelectedBackgroundColor() {
- Color color = JFaceResources.getColorRegistry().get(
- getColorFontId(COLOR_ENTRY_SELECTED_BACKGROUND));
+ Color color = JFaceResources.getColorRegistry()
+ .get(getColorFontId(COLOR_ENTRY_SELECTED_BACKGROUND));
Iterator entries = entries();
while (entries.hasNext()) {
entries.next().setSelectedBackground(color);
@@ -390,8 +415,8 @@ private void updateEntriesSelectedBackgroundColor() {
}
private void updateEntriesSelectedForegroundColor() {
- Color color = JFaceResources.getColorRegistry().get(
- getColorFontId(COLOR_ENTRY_SELECTED_FOREGROUND));
+ Color color = JFaceResources.getColorRegistry()
+ .get(getColorFontId(COLOR_ENTRY_SELECTED_FOREGROUND));
Iterator entries = entries();
while (entries.hasNext()) {
entries.next().setSelectedForeground(color);
@@ -399,8 +424,8 @@ private void updateEntriesSelectedForegroundColor() {
}
private void updateEntriesSelectedFont() {
- Font font = JFaceResources.getFontRegistry().get(
- getColorFontId(FONT_ENTRY_SELECTED));
+ Font font = JFaceResources.getFontRegistry()
+ .get(getColorFontId(FONT_ENTRY_SELECTED));
Iterator entries = entries();
while (entries.hasNext()) {
entries.next().setSelectedFont(font);
@@ -408,8 +433,8 @@ private void updateEntriesSelectedFont() {
}
protected Iterator entries() {
- return Chainability.iterate(firstSection == null ? null
- : firstSection.firstEntry, null);
+ return Chainability.iterate(
+ firstSection == null ? null : firstSection.firstEntry, null);
}
protected Iterator sections() {
@@ -495,8 +520,8 @@ protected void addEditingEntry(IPropertyDescriptor descriptor) {
if (section.firstEntry == null || section.lastEntry == null) {
section.firstEntry = entry;
if (section.getPrevious() != null) {
- Chainability
- .insertAfter(section.getPrevious().lastEntry, entry);
+ Chainability.insertAfter(section.getPrevious().lastEntry,
+ entry);
}
} else {
Chainability.insertAfter(section.lastEntry, entry);
@@ -509,8 +534,8 @@ private void createSectionControls() {
return;
Composite parent = getContents();
- if (firstSection.getNext() == null
- && (firstSection.title == null || "".equals(firstSection.title))) { //$NON-NLS-1$
+ if (firstSection.getNext() == null && (firstSection.title == null
+ || "".equals(firstSection.title))) { //$NON-NLS-1$
Iterator it = firstSection.entries();
while (it.hasNext()) {
PropertyEditingEntry entry = it.next();
@@ -523,8 +548,8 @@ private void createSectionControls() {
Section section = sectionIt.next();
section.create(parent);
if (section.section != null) {
- section.section.getControl().setLayoutData(
- createSectionLayoutData());
+ section.section.getControl()
+ .setLayoutData(createSectionLayoutData());
}
}
}
@@ -612,9 +637,8 @@ protected void fireSelectionChanged() {
ISelection selection = getSelection();
for (Object listener : listeners.getListeners()) {
if (listener instanceof ISelectionChangedListener) {
- ((ISelectionChangedListener) listener)
- .selectionChanged(new SelectionChangedEvent(this,
- selection));
+ ((ISelectionChangedListener) listener).selectionChanged(
+ new SelectionChangedEvent(this, selection));
}
}
}
diff --git a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/resources/ImageReference.java b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/resources/ImageReference.java
index 6af682ffa..65fad9d8c 100644
--- a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/resources/ImageReference.java
+++ b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/resources/ImageReference.java
@@ -86,8 +86,12 @@ private void disposeImage() {
public synchronized Image getImage() {
if (image == null || image.isDisposed()) {
- image = descriptor.createImage(returnMissingImageOnError,
- device);
+ try {
+ image = descriptor.createImage(returnMissingImageOnError,
+ device);
+ } catch (SWTException e) {
+ image = null;
+ }
}
return image;
}
diff --git a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/util/JobPool.java b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/util/JobPool.java
new file mode 100644
index 000000000..637fa9ef0
--- /dev/null
+++ b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/util/JobPool.java
@@ -0,0 +1,139 @@
+package org.xmind.ui.util;
+
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.osgi.util.NLS;
+import org.xmind.ui.internal.ToolkitPlugin;
+
+public class JobPool {
+
+ private static boolean DEBUG = false;
+
+ private static final int DEFAULT_RETRY_NUM = 0;
+
+ private static final int DEFAULT_RUNNING_MAX_NUM = 5;
+
+ private static class JobTask {
+
+ final Job job;
+
+ final Runnable onFinish;
+
+ public JobTask(Job job, Runnable onFinish) {
+ this.job = job;
+ this.onFinish = onFinish;
+ }
+ }
+
+ private Queue waitingJobs = new ConcurrentLinkedQueue();
+
+ private int retryNum = DEFAULT_RETRY_NUM;
+
+ private int runningMaxNum = DEFAULT_RUNNING_MAX_NUM;
+
+ private int runningJobCount = 0;
+
+ public JobPool() {
+ }
+
+ public int getRetryNum() {
+ return retryNum;
+ }
+
+ public void setRetryNum(int retryNum) {
+ this.retryNum = retryNum;
+ }
+
+ public int getRunningMaxNum() {
+ return runningMaxNum;
+ }
+
+ public void setRunningMaxNum(int runningMaxNum) {
+ this.runningMaxNum = runningMaxNum;
+ }
+
+ public void scheduleJob(final Job job, final Runnable onFinish) {
+ waitingJobs.offer(new JobTask(job, onFinish));
+ scheduleNext();
+ }
+
+ public void cancelRemaining() {
+ waitingJobs.clear();
+ }
+
+ private synchronized void scheduleNext() {
+ if (runningJobCount < runningMaxNum) {
+ JobTask task = waitingJobs.poll();
+ if (task != null) {
+ try {
+ startJob(task.job, task.onFinish);
+ } catch (Throwable e) {
+ log(e, "Error occurred while job running..."); //$NON-NLS-1$
+ }
+ runningJobCount++;
+ }
+ }
+ }
+
+ private void startJob(final Job job, final Runnable onFinish) {
+ final int[] retryCount = new int[] { 0 };
+ job.addJobChangeListener(new JobChangeAdapter() {
+ @Override
+ public void done(IJobChangeEvent event) {
+ super.done(event);
+ int status = event.getJob().getResult().getSeverity();
+ if (status != IStatus.OK && status != IStatus.CANCEL) {
+ if (++retryCount[0] < retryNum) {
+ job.schedule();
+ if (DEBUG)
+ System.out.println("Retry failed [try=" //$NON-NLS-1$
+ + (retryCount[0] + 1) + "]."); //$NON-NLS-1$
+ return;
+ } else {
+ if (DEBUG)
+ System.out.println(NLS.bind(
+ "Job failed after {0} retries.", retryNum)); //$NON-NLS-1$
+ }
+ } else {
+ if (DEBUG) {
+ if (status == IStatus.OK)
+ System.out.println("Job succeeded."); //$NON-NLS-1$
+ else
+ System.out.println("Job canceled."); //$NON-NLS-1$
+ }
+ }
+
+ try {
+ if (onFinish != null) {
+ try {
+ onFinish.run();
+ } catch (Throwable e) {
+ log(e, "Error occurred while calling back on job finished."); //$NON-NLS-1$
+ }
+ }
+ } finally {
+ runningJobCount--;
+ scheduleNext();
+ }
+ }
+ });
+ job.schedule();
+ if (DEBUG)
+ System.out.println("New job start [try=" + (retryCount[0] + 1) //$NON-NLS-1$
+ + "]."); //$NON-NLS-1$
+ }
+
+ public static void log(Throwable exception, String message) {
+ ToolkitPlugin.getDefault().getLog()
+ .log(new Status(
+ exception == null ? IStatus.INFO : IStatus.ERROR,
+ ToolkitPlugin.PLUGIN_ID, message, exception));
+ }
+
+}
diff --git a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/viewers/CategorizedViewer.java b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/viewers/CategorizedViewer.java
index 4e3ef4390..2eee4937d 100644
--- a/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/viewers/CategorizedViewer.java
+++ b/bundles/org.xmind.ui.toolkit/src/org/xmind/ui/viewers/CategorizedViewer.java
@@ -24,6 +24,7 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Util;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
@@ -101,12 +102,31 @@ private ScrolledForm createContainer(Composite parent, int style) {
form.setBackground(parent.getBackground());
form.setForeground(parent.getForeground());
form.setFont(JFaceResources.getHeaderFont());
+ addHorizontalScrollSupport(form);
container = form;
configureContainer(container);
return container;
}
+ // add horizontal scroll support for windows
+ private void addHorizontalScrollSupport(final ScrolledForm form) {
+ if (Util.isWindows()) {
+ form.addListener(SWT.MouseHorizontalWheel, new Listener() {
+
+ public void handleEvent(Event event) {
+ if (!form.isDisposed()) {
+ int offset = event.count;
+ offset = -(int) (Math.sqrt(Math.abs(offset)) * offset);
+
+ Point origin = form.getOrigin();
+ form.setOrigin(origin.x + offset, origin.y);
+ }
+ }
+ });
+ }
+ }
+
protected WidgetFactory createWidgetFactory(Display display) {
return new WidgetFactory(display);
}
diff --git a/bundles/org.xmind.ui/META-INF/MANIFEST.MF b/bundles/org.xmind.ui/META-INF/MANIFEST.MF
index 1f652082f..f23e71b9e 100644
--- a/bundles/org.xmind.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.xmind.ui/META-INF/MANIFEST.MF
@@ -2,13 +2,13 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.xmind.ui;singleton:=true
-Bundle-Version: 3.7.2.qualifier
+Bundle-Version: 3.7.3.qualifier
Bundle-Activator: org.xmind.ui.internal.XmindUIPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.xmind.ui.mindmap;bundle-version="[3.7.2,3.8.0)";visibility:=reexport,
- org.xmind.ui.toolkit;bundle-version="[3.7.2,3.8.0)"
+ org.xmind.ui.mindmap;bundle-version="[3.7.3,3.8.0)";visibility:=reexport,
+ org.xmind.ui.toolkit;bundle-version="[3.7.3,3.8.0)"
Eclipse-LazyStart: true
Export-Package: org.xmind.ui.internal;x-friends:="org.xmind.ui"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/bundles/org.xmind.ui/pom.xml b/bundles/org.xmind.ui/pom.xml
index 81c20c3ee..9a61f552c 100644
--- a/bundles/org.xmind.ui/pom.xml
+++ b/bundles/org.xmind.ui/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.plugins
org.xmind.ui
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-plugin
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/bundles/org.xmind.ui/schema/shareOptions.exsd b/bundles/org.xmind.ui/schema/shareOptions.exsd
index 7b6b7adde..cbed7e4d8 100644
--- a/bundles/org.xmind.ui/schema/shareOptions.exsd
+++ b/bundles/org.xmind.ui/schema/shareOptions.exsd
@@ -111,6 +111,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/features/org.xmind.cathy.feature/feature.xml b/features/org.xmind.cathy.feature/feature.xml
index 6504fb600..4ad7d6e9a 100644
--- a/features/org.xmind.cathy.feature/feature.xml
+++ b/features/org.xmind.cathy.feature/feature.xml
@@ -2,7 +2,7 @@
diff --git a/features/org.xmind.cathy.feature/pom.xml b/features/org.xmind.cathy.feature/pom.xml
index 3bee66494..7a421f278 100644
--- a/features/org.xmind.cathy.feature/pom.xml
+++ b/features/org.xmind.cathy.feature/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.features
org.xmind.cathy.feature
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-feature
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/features/org.xmind.cathy.platform.feature/feature.xml b/features/org.xmind.cathy.platform.feature/feature.xml
index b4171bcb0..a92514ce5 100644
--- a/features/org.xmind.cathy.platform.feature/feature.xml
+++ b/features/org.xmind.cathy.platform.feature/feature.xml
@@ -2,7 +2,7 @@
diff --git a/features/org.xmind.cathy.platform.feature/pom.xml b/features/org.xmind.cathy.platform.feature/pom.xml
index b0c7a1c93..8775890ee 100644
--- a/features/org.xmind.cathy.platform.feature/pom.xml
+++ b/features/org.xmind.cathy.platform.feature/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.features
org.xmind.cathy.platform.feature
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-feature
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/features/org.xmind.graphicsio.feature/feature.xml b/features/org.xmind.graphicsio.feature/feature.xml
index 8ced3729e..838f8cac4 100644
--- a/features/org.xmind.graphicsio.feature/feature.xml
+++ b/features/org.xmind.graphicsio.feature/feature.xml
@@ -2,7 +2,7 @@
diff --git a/features/org.xmind.graphicsio.feature/pom.xml b/features/org.xmind.graphicsio.feature/pom.xml
index 8ea350dec..8568d9063 100644
--- a/features/org.xmind.graphicsio.feature/pom.xml
+++ b/features/org.xmind.graphicsio.feature/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.features
org.xmind.graphicsio.feature
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-feature
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/features/org.xmind.hebe.feature/feature.xml b/features/org.xmind.hebe.feature/feature.xml
index 3087793c7..c97a86895 100644
--- a/features/org.xmind.hebe.feature/feature.xml
+++ b/features/org.xmind.hebe.feature/feature.xml
@@ -2,7 +2,7 @@
diff --git a/features/org.xmind.hebe.feature/pom.xml b/features/org.xmind.hebe.feature/pom.xml
index eb2050337..baabb796c 100644
--- a/features/org.xmind.hebe.feature/pom.xml
+++ b/features/org.xmind.hebe.feature/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.features
org.xmind.hebe.feature
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-feature
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/pom.xml b/pom.xml
index fa8fc8869..327112904 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
pom
diff --git a/releng/org.xmind.cathy.product/META-INF/MANIFEST.MF b/releng/org.xmind.cathy.product/META-INF/MANIFEST.MF
index 6113602a6..3853cb52c 100644
--- a/releng/org.xmind.cathy.product/META-INF/MANIFEST.MF
+++ b/releng/org.xmind.cathy.product/META-INF/MANIFEST.MF
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: XMind Products
Bundle-SymbolicName: org.xmind.products
-Bundle-Version: 3.7.2.qualifier
+Bundle-Version: 3.7.3.qualifier
Bundle-Vendor: XMind Ltd.
diff --git a/releng/org.xmind.cathy.product/cathy.product b/releng/org.xmind.cathy.product/cathy.product
index dc5fde8b1..66ee428c2 100644
--- a/releng/org.xmind.cathy.product/cathy.product
+++ b/releng/org.xmind.cathy.product/cathy.product
@@ -1,7 +1,7 @@
-
+
diff --git a/releng/org.xmind.cathy.product/pom.xml b/releng/org.xmind.cathy.product/pom.xml
index 2e241e359..2abd1ca01 100644
--- a/releng/org.xmind.cathy.product/pom.xml
+++ b/releng/org.xmind.cathy.product/pom.xml
@@ -5,13 +5,13 @@
4.0.0
org.xmind.releng
org.xmind.cathy.product
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-repository
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/releng/org.xmind.cathy.repository/category.xml b/releng/org.xmind.cathy.repository/category.xml
index 6bde93184..db8f42626 100644
--- a/releng/org.xmind.cathy.repository/category.xml
+++ b/releng/org.xmind.cathy.repository/category.xml
@@ -1,15 +1,15 @@
-
+
-
+
-
+
-
+
diff --git a/releng/org.xmind.cathy.repository/pom.xml b/releng/org.xmind.cathy.repository/pom.xml
index 3a7aee217..68485041c 100644
--- a/releng/org.xmind.cathy.repository/pom.xml
+++ b/releng/org.xmind.cathy.repository/pom.xml
@@ -8,7 +8,7 @@
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/releng/org.xmind.cathy.target/pom.xml b/releng/org.xmind.cathy.target/pom.xml
index d7893b33e..b2cd8b678 100644
--- a/releng/org.xmind.cathy.target/pom.xml
+++ b/releng/org.xmind.cathy.target/pom.xml
@@ -8,7 +8,7 @@
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
diff --git a/tests/org.xmind.core.runtime.tests/META-INF/MANIFEST.MF b/tests/org.xmind.core.runtime.tests/META-INF/MANIFEST.MF
index c68db4933..86a54f574 100644
--- a/tests/org.xmind.core.runtime.tests/META-INF/MANIFEST.MF
+++ b/tests/org.xmind.core.runtime.tests/META-INF/MANIFEST.MF
@@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.xmind.core.runtime.tests;singleton:=true
-Bundle-Version: 3.7.2.qualifier
+Bundle-Version: 3.7.3.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.junit,
- org.xmind.core.runtime;bundle-version="[3.7.2,3.8.0)"
+ org.xmind.core.runtime;bundle-version="[3.7.3,3.8.0)"
diff --git a/tests/org.xmind.core.runtime.tests/pom.xml b/tests/org.xmind.core.runtime.tests/pom.xml
index 0f2b8c49d..dd5f397ea 100644
--- a/tests/org.xmind.core.runtime.tests/pom.xml
+++ b/tests/org.xmind.core.runtime.tests/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.tests
org.xmind.core.runtime.tests
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-test-plugin
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
\ No newline at end of file
diff --git a/tests/org.xmind.core.tests/META-INF/MANIFEST.MF b/tests/org.xmind.core.tests/META-INF/MANIFEST.MF
index 14dc1e2f0..26ebf6837 100644
--- a/tests/org.xmind.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.xmind.core.tests/META-INF/MANIFEST.MF
@@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.xmind.core.tests;singleton:=true
-Bundle-Version: 3.7.2.qualifier
+Bundle-Version: 3.7.3.qualifier
Bundle-Activator: org.xmind.core.internal.tests.TestPluginForXMindCore
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.eclipse.core.runtime,
org.junit,
- org.xmind.core;bundle-version="[3.7.2,3.8.0)"
+ org.xmind.core;bundle-version="[3.7.3,3.8.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.xmind.core.internal.experiments;x-internal:=true,
diff --git a/tests/org.xmind.core.tests/pom.xml b/tests/org.xmind.core.tests/pom.xml
index 74bfb08e3..35b43a0e5 100644
--- a/tests/org.xmind.core.tests/pom.xml
+++ b/tests/org.xmind.core.tests/pom.xml
@@ -5,12 +5,12 @@
4.0.0
org.xmind.cathy.tests
org.xmind.core.tests
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
eclipse-test-plugin
org.xmind.releng
org.xmind.cathy.releng
- 3.7.2-SNAPSHOT
+ 3.7.3-SNAPSHOT
../../
\ No newline at end of file