Permalink
Browse files

disabled MacOSX 32bit build (no such Java 7 JRE available)

turn off debug level logging
minor documentation edit
added version number to splash image
fixed sibling detection for navigator commands
fixed drag and drop capture
only show first level of selected originals when drive is detached
crosswalks run via a right-click command only, not automatic
moved most of image preview loading off of the UI thread
added a crosswalk file property tester
  • Loading branch information...
gregjan committed Sep 11, 2012
1 parent ca2bcf6 commit f8ffd1e17d364297ac90bcae0f1102a801a5cf1b
Showing with 227 additions and 199 deletions.
  1. +5 −5 eclipse-repository/workbench.product
  2. +2 −2 pom.xml
  3. +19 −18 workbench_feature/feature.xml
  4. +1 −1 workbench_feature/rootfiles/log4j.properties
  5. +1 −1 workbench_plugin/.classpath
  6. +1 −1 workbench_plugin/META-INF/MANIFEST.MF
  7. +1 −1 workbench_plugin/intro/whatsnew.xml
  8. +33 −15 workbench_plugin/plugin.xml
  9. +4 −4 workbench_plugin/pom.xml
  10. BIN workbench_plugin/splash.bmp
  11. BIN workbench_plugin/splash.xcf
  12. +2 −2 workbench_plugin/src/main/java/log4j.properties
  13. +7 −0 workbench_plugin/src/main/java/unc/lib/cdr/workbench/SelectionPropertyTester.java
  14. +5 −3 workbench_plugin/src/main/java/unc/lib/cdr/workbench/arrange/ArrangementDropListener.java
  15. +5 −1 workbench_plugin/src/main/java/unc/lib/cdr/workbench/capture/CaptureJob.java
  16. +14 −11 workbench_plugin/src/main/java/unc/lib/cdr/workbench/capture/OriginalsContentProvider.java
  17. +8 −1 workbench_plugin/src/main/java/unc/lib/cdr/workbench/capture/OriginalsLabelProvider.java
  18. +1 −1 workbench_plugin/src/main/java/unc/lib/cdr/workbench/capture/OriginalsLinkJob.java
  19. +53 −0 workbench_plugin/src/main/java/unc/lib/cdr/workbench/commands/CrosswalkCommand.java
  20. +4 −0 workbench_plugin/src/main/java/unc/lib/cdr/workbench/originals/OriginalFileStore.java
  21. +15 −10 workbench_plugin/src/main/java/unc/lib/cdr/workbench/originals/OriginalStub.java
  22. +1 −17 workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/MetsProjectNature.java
  23. +2 −1 workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/ApplicationActionBarAdvisor.java
  24. +1 −1 workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/METSWorkspaceSaveParticipant.java
  25. +14 −9 workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/ViewPartPreviewFile.java
  26. +19 −94 ...gin/src/main/java/unc/lib/cdr/workbench/xwalk/{CrosswalksProjectBuilder.java → CrosswalkJob.java}
  27. +9 −0 workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/MetadataSourcePropertyTester.java
@@ -37,7 +37,7 @@ Biff Hollingsworth
<launcherArgs>
<programArgs>-consoleLog -data @user.home/curators-workspace</programArgs>
- <vmArgs>-Dosgi.requiredJavaVersion=1.7 -XX:MaxPermSize=128m -Xms128m -Xmx1024m -Djargon.debug=0 -Dlog4j.configuration=file:./log4j.properties</vmArgs>
+ <vmArgs>-Dosgi.requiredJavaVersion=1.6 -XX:MaxPermSize=256m -Xms128m -Xmx1024m -Djargon.debug=0 -Dlog4j.configuration=file:./log4j.properties</vmArgs>
</launcherArgs>
<windowImages/>
@@ -55,10 +55,10 @@ Biff Hollingsworth
<intro introId="org.eclipse.ui.intro.universal"/>
<vm>
- <linux include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</linux>
- <macos include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</macos>
- <solaris include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</solaris>
- <windows include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</windows>
+ <linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</linux>
+ <macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</macos>
+ <solaris include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</solaris>
+ <windows include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</windows>
</vm>
<license>
View
@@ -103,11 +103,11 @@
<ws>gtk</ws>
<arch>x86</arch>
</environment>
- <environment>
+ <!-- <environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86</arch>
- </environment>
+ </environment> -->
<environment>
<os>macosx</os>
<ws>cocoa</ws>
@@ -60,15 +60,21 @@
<import plugin="org.eclipse.draw2d"/>
<import plugin="org.eclipse.gmf.runtime.draw2d.ui"/>
<import plugin="org.eclipse.gef"/>
+ <import plugin="org.slf4j.log4j12" version="1.6.6" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime" version="3.5.0" match="compatible"/>
<import plugin="org.eclipse.gmf.runtime.common.core" version="1.2.0" match="compatible"/>
<import plugin="org.eclipse.emf.workspace" version="1.2.0" match="compatible"/>
<import plugin="org.eclipse.gmf.runtime.emf.core" version="1.2.0" match="compatible"/>
<import plugin="org.eclipse.core.expressions" version="3.2.0" match="compatible"/>
+ <import plugin="org.eclipse.core.filesystem" version="1.3.0" match="compatible"/>
+ <import plugin="org.eclipse.core.runtime" version="3.7.0" match="compatible"/>
+ <import plugin="org.eclipse.emf.common" version="2.7.0" match="compatible"/>
+ <import plugin="org.eclipse.emf.ecore" version="2.7.0" match="compatible"/>
<import plugin="org.eclipse.core.runtime" version="3.2.0" match="compatible"/>
<import plugin="org.eclipse.core.filesystem" version="1.0.0" match="compatible"/>
<import plugin="org.eclipse.help" version="3.2.0" match="compatible"/>
<import plugin="org.eclipse.ui" version="3.5.0" match="compatible"/>
+ <import plugin="org.eclipse.ui.workbench" version="3.7.0" match="compatible"/>
<import plugin="org.eclipse.jface.text" version="3.2.0" match="compatible"/>
<import plugin="org.eclipse.equinox.p2.engine" version="2.0.0" match="compatible"/>
<import plugin="org.eclipse.equinox.p2.metadata" version="2.0.0" match="compatible"/>
@@ -84,8 +90,14 @@
<import plugin="org.eclipse.ui.workbench.texteditor" version="3.6.0" match="compatible"/>
<import plugin="org.eclipse.ltk.core.refactoring" version="3.5.0" match="compatible"/>
<import plugin="org.eclipse.ltk.ui.refactoring" version="3.5.0" match="compatible"/>
+ <import plugin="org.eclipse.ui.views" version="3.6.0" match="compatible"/>
+ <import plugin="org.eclipse.emf.edit" version="2.7.0" match="compatible"/>
+ <import plugin="org.eclipse.emf.common.ui" version="2.7.0" match="compatible"/>
<import plugin="org.eclipse.ocl" version="3.0.0" match="compatible"/>
+ <import plugin="org.eclipse.ui" version="3.7.0" match="compatible"/>
<import plugin="org.eclipse.ui.ide" version="3.5.0" match="compatible"/>
+ <import plugin="org.eclipse.jface.text" version="3.7.0" match="compatible"/>
+ <import plugin="org.eclipse.ui.workbench.texteditor" version="3.7.0" match="compatible"/>
<import plugin="org.eclipse.core.filebuffers" version="3.5.0" match="compatible"/>
<import plugin="org.eclipse.core.resources" version="3.5.0" match="compatible"/>
<import plugin="org.eclipse.core.filesystem" version="1.2.0" match="compatible"/>
@@ -99,30 +111,19 @@
<import plugin="org.eclipse.emf.ecore.xmi" version="2.5.0" match="compatible"/>
<import plugin="lpg.runtime.java" version="2.0.17" match="compatible"/>
<import plugin="org.eclipse.emf.ecore" version="2.3.0" match="compatible"/>
- <import plugin="org.apache.commons.codec" version="1.3.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.gmf.runtime.emf.type.core" version="1.4.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.help" version="3.5.0" match="compatible"/>
- <import plugin="org.eclipse.ui.forms" version="3.5.0" match="compatible"/>
- <import plugin="org.eclipse.core.expressions" version="3.4.200" match="greaterOrEqual"/>
- <import plugin="org.eclipse.ui.intro" version="3.4.0" match="compatible"/>
- <import plugin="org.slf4j.log4j12" version="1.6.6" match="greaterOrEqual"/>
- <import plugin="org.eclipse.core.filesystem" version="1.3.0" match="compatible"/>
- <import plugin="org.eclipse.core.runtime" version="3.7.0" match="compatible"/>
- <import plugin="org.eclipse.emf.common" version="2.7.0" match="compatible"/>
- <import plugin="org.eclipse.emf.ecore" version="2.7.0" match="compatible"/>
- <import plugin="org.eclipse.ui.workbench" version="3.7.0" match="compatible"/>
- <import plugin="org.eclipse.ui.views" version="3.6.0" match="compatible"/>
- <import plugin="org.eclipse.emf.edit" version="2.7.0" match="compatible"/>
- <import plugin="org.eclipse.emf.common.ui" version="2.7.0" match="compatible"/>
- <import plugin="org.eclipse.ui" version="3.7.0" match="compatible"/>
- <import plugin="org.eclipse.jface.text" version="3.7.0" match="compatible"/>
- <import plugin="org.eclipse.ui.workbench.texteditor" version="3.7.0" match="compatible"/>
<import plugin="org.eclipse.core.expressions" version="3.4.300" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.filesystem" version="1.3.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.navigator" version="3.5.100" match="greaterOrEqual"/>
+ <import plugin="org.apache.commons.codec" version="1.3.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.views.properties.tabbed" version="3.5.200" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.gmf.runtime.emf.type.core" version="1.4.0" match="greaterOrEqual"/>
<import plugin="crosswalk-gmf.custom"/>
<import plugin="access-control" version="4.0.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.help" version="3.5.0" match="compatible"/>
+ <import plugin="org.eclipse.ui.forms" version="3.5.0" match="compatible"/>
+ <import plugin="org.eclipse.core.expressions" version="3.4.200" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui.intro" version="3.4.0" match="compatible"/>
+ <import plugin="org.apache.log4j" version="1.2.17" match="greaterOrEqual"/>
</requires>
<plugin
@@ -1,6 +1,6 @@
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=ERROR, A1, R
-log4j.logger.unc.lib=DEBUG
+log4j.logger.unc.lib=WARN
log4j.logger.org.irods.jargon.core=ERROR
# A1 is set to be a ConsoleAppender.
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java/"/>
<classpathentry kind="src" path="src/main/resources/"/>
@@ -21,7 +21,7 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="3.4.300",
crosswalk-gmf.custom;bundle-version="0.0.0",
org.slf4j.log4j12;bundle-version="1.6.6",
org.apache.log4j;bundle-version="1.2.17"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/jargon-core-0.0.2.jar,
@@ -54,7 +54,7 @@
This was implemented to support a local EAD authoring scenario, but may be useful to others. You can also now export entire projects
to a ZIP file or a shared drive. This was done to support multi-user work flows and projects with a significant wait
between the capture step and arrangement or description. Individual files, such as crosswalks and data dictionaries, can also
- be export and imported across project and workbench installations.</text>
+ be exported and imported across project and workbench installations.</text>
</group>
<group
label='Deposit Form Designer'
@@ -14,7 +14,7 @@
class="unc.lib.cdr.workbench.xwalk.MetadataSourcePropertyTester"
id="cdr-workbench.propertyTesterMetadataSource"
namespace="cdr-workbench"
- properties="isTabularMetadataSource"
+ properties="isTabularMetadataSource,isCrosswalkFile"
type="org.eclipse.core.resources.IFile">
</propertyTester>
<propertyTester
@@ -177,6 +177,11 @@
id="org.eclipse.ui.commands.radioState">
</state>
</command>
+ <command
+ defaultHandler="unc.lib.cdr.workbench.commands.CrosswalkCommand"
+ id="workbench_plugin.commandRunCrosswalk"
+ name="Run Crosswalk">
+ </command>
</extension>
<extension
point="org.eclipse.ui.handlers">
@@ -842,6 +847,32 @@
</with>
</visibleWhen>
</command>
+ <command
+ commandId="workbench_plugin.commandRunCrosswalk"
+ label="Run Crosswalk"
+ mnemonic="R"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false">
+ <and>
+ <instanceof
+ value="org.eclipse.core.resources.IFile">
+ </instanceof>
+ <test
+ property="cdr-workbench.isCrosswalkFile">
+ </test>
+ </and>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
</menuContribution>
<menuContribution
allPopups="false"
@@ -1379,10 +1410,7 @@
value="unc.lib.cdr.workbench.arrange.ArrangementProjectElement">
</instanceof>
<instanceof
- value="org.eclipse.core.resources.IFile">
- </instanceof>
- <instanceof
- value="org.eclipse.core.resources.IFolder">
+ value="unc.lib.cdr.workbench.originals.OriginalFileStore">
</instanceof>
<instanceof
value="gov.loc.mets.MdSecType">
@@ -1546,16 +1574,6 @@
</run>
</builder>
</extension>
- <extension
- id="unc.lib.cdr.workbench.builders.CrosswalksBuilder"
- name="Crosswalk Builder"
- point="org.eclipse.core.resources.builders">
- <builder>
- <run
- class="unc.lib.cdr.workbench.xwalk.CrosswalksProjectBuilder">
- </run>
- </builder>
- </extension>
<extension
point="org.eclipse.ui.editors">
<editor
View
@@ -18,17 +18,17 @@
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
</plugins>
View
Binary file not shown.
View
Binary file not shown.
@@ -24,5 +24,5 @@ log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
-log4j.logger.unc.lib=DEBUG
-log4j.logger.org.irods.jargon.core=INFO
+log4j.logger.unc.lib=WARN
+log4j.logger.org.irods.jargon.core=WARN
@@ -103,6 +103,13 @@ public boolean test(Object receiver, String property, Object[] args, Object expe
if(!(r instanceof OriginalFileStore)) {
return false;
}
+ if(((OriginalFileStore)r).getParent() == null) {
+ if(c != null) {
+ return false;
+ } else {
+ continue;
+ }
+ }
if(!(c.equals((OriginalFileStore)((OriginalFileStore)r).getParent()))) {
System.out.println("not the same parent");
return false;
@@ -353,9 +353,11 @@ public boolean validateDrop(Object target, int operation, TransferData transferD
try {
IStructuredSelection sel = (IStructuredSelection)LocalSelectionTransfer.getTransfer().getSelection();
for(Object o : sel.toArray()) {
- if(o instanceof IResource) {
- IResource r = (IResource)o;
- if (!MetsProjectNature.ORIGINALS_FOLDER_NAME.equals(r.getProjectRelativePath().segment(0))) {
+ if(o instanceof OriginalFileStore) {
+ OriginalFileStore r = (OriginalFileStore)o;
+ if(r.isAttached()) {
+ continue;
+ } else {
return false;
}
} else if(o instanceof DivType) {
@@ -300,7 +300,11 @@ private DivType makeDiv(OriginalFileStore original) throws CoreException {
contentIds.add("info:fedora/uuid:" + uuid.toString());
result.setCONTENTIDS(contentIds);
result.setID(original.getDivID());
- result.setLABEL1(original.getWrapped().getName());
+ String name = original.getWrapped().getName();
+ if(name == null || name.trim().isEmpty()) {
+ name = "(disc root)";
+ }
+ result.setLABEL1(name);
if (original.fetchInfo().isDirectory()) {
result.setTYPE(METSConstants.Div_Folder);
} else {
@@ -28,6 +28,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import unc.lib.cdr.workbench.originals.OriginalFileStore;
import unc.lib.cdr.workbench.originals.OriginalStub;
import unc.lib.cdr.workbench.project.MetsProjectNature;
@@ -61,13 +62,15 @@ public OriginalsContentProvider() {
MetsProjectNature n = (MetsProjectNature) p.getNature(MetsProjectNature.NATURE_ID);
results.addAll(n.getOriginals());
}
- } else if(parent instanceof OriginalStub) {
- OriginalStub original = (OriginalStub)parent;
+ } else if (parent instanceof OriginalStub) {
+ OriginalStub original = (OriginalStub) parent;
results.addAll(original.getStores());
- } else if (parent instanceof IFileStore) {
- IFileStore f = (IFileStore) parent;
- for (IFileStore r : f.childStores(0, new NullProgressMonitor())) {
- results.add(r);
+ } else if (parent instanceof OriginalFileStore) {
+ OriginalFileStore f = (OriginalFileStore) parent;
+ if (f.isAttached()) {
+ for (IFileStore r : f.childStores(0, new NullProgressMonitor())) {
+ results.add(r);
+ }
}
}
} catch (CoreException e) {
@@ -85,7 +88,7 @@ public OriginalsContentProvider() {
public Object getParent(Object element) {
Object result = null;
if (element instanceof IFileStore) {
- return ((IFileStore)element).getParent();
+ return ((IFileStore) element).getParent();
} else {
return result;
}
@@ -98,13 +101,13 @@ public Object getParent(Object element) {
*/
@Override
public boolean hasChildren(Object element) {
- if(element instanceof OriginalStub) {
+ if (element instanceof OriginalStub) {
return true;
- } else if(element instanceof IFileStore) {
- IFileStore fs = (IFileStore)element;
+ } else if (element instanceof IFileStore) {
+ IFileStore fs = (IFileStore) element;
try {
return (fs.fetchInfo().isDirectory() && fs.childNames(EFS.NONE, new NullProgressMonitor()).length > 0);
- } catch(CoreException e) {
+ } catch (CoreException e) {
e.printStackTrace();
return false;
}
@@ -146,7 +146,14 @@ public String getText(Object element) {
OriginalStub o = (OriginalStub)element;
return o.getName();
} else if(element instanceof IFileStore) {
- return ((IFileStore)element).getName();
+ IFileStore fs = (IFileStore)element;
+ String name = fs.getName();
+ //System.out.println("got name: |"+name+"|");
+ if(name == null || name.trim().length() == 0) {
+ return "(disc root)";
+ } else {
+ return name;
+ }
}
return provider.getText(element);
}
@@ -120,7 +120,7 @@ protected IStatus run(IProgressMonitor monitor) {
existingStub = s;
}
}
- if(existingStub != null) {
+ if(existingStub != null && existingStub.isAttached()) {
existingStub.addLocations(volumeToLocations.get(volumeRoot), volumeToPrestageLocations.get(volumeRoot));
} else {
OriginalStub original = new OriginalStub(volumeRoot, volumeToLocations.get(volumeRoot), volumeToPrestageLocations.get(volumeRoot), this.project);
Oops, something went wrong.

0 comments on commit f8ffd1e

Please sign in to comment.