-> some little UI Bugs
git-svn-id: https://svn.argeo.org/commons/trunk@4277
4cfe0d0a-d680-48aa-b62c-
e0a02a3f76cc
<configuration>
<instructions>
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
<configuration>
<instructions>
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
+ <Require-Bundle>org.eclipse.ui;resolution:=optional,org.eclipse.rap.ui;resolution:=optional,org.eclipse.core.runtime</Require-Bundle>
<Import-Package>
org.eclipse.swt,
org.argeo.eclipse.ui.specific,
*
</Import-Package>
<Import-Package>
org.eclipse.swt,
org.argeo.eclipse.ui.specific,
*
</Import-Package>
- <Require-Bundle>org.eclipse.ui;resolution:=optional,org.eclipse.rap.ui;resolution:=optional,org.eclipse.core.runtime</Require-Bundle>
</instructions>
</configuration>
</plugin>
</instructions>
</configuration>
</plugin>
<groupId>org.slf4j</groupId>
<artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
</dependency>
<groupId>org.slf4j</groupId>
<artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
</dependency>
</dependencies>
</project>
</dependencies>
</project>
<instructions>
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
<Bundle-Activator>org.argeo.eclipse.ui.ArgeoUiPlugin</Bundle-Activator>
<instructions>
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
<Bundle-Activator>org.argeo.eclipse.ui.ArgeoUiPlugin</Bundle-Activator>
- <Require-Bundle>org.eclipse.rap.ui,org.eclipse.core.runtime</Require-Bundle>
+ <Require-Bundle>org.eclipse.rap.ui,org.eclipse.rwt.widgets.upload,org.eclipse.core.runtime</Require-Bundle>
+ <!-- IMPORTANT : Note that we must exclude certain packages that are
+ provided by dependencies to be sure that packages used in the current workspace
+ are those provided by the require-bundles. Especially rwt.widgets.upload
+ by instance. -->
<Import-Package>
org.apache.commons.io,
org.argeo,
org.springframework.beans.factory,
org.springframework.core.io.support,
<Import-Package>
org.apache.commons.io,
org.argeo,
org.springframework.beans.factory,
org.springframework.core.io.support,
+ !org.eclipse.rwt.widgets,
!org.eclipse.core.runtime,
!org.eclipse.core.commands,
!org.eclipse.ui.plugin,
!org.eclipse.core.runtime,
!org.eclipse.core.commands,
!org.eclipse.ui.plugin,
<version>${version.argeo-commons}</version>
</dependency>
<version>${version.argeo-commons}</version>
</dependency>
+ <dependency>
+ <groupId>org.argeo.dep.rap</groupId>
+ <artifactId>org.eclipse.rwt.widgets.upload</artifactId>
+ </dependency>
+
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
*/
public class FileHandler {
*/
public class FileHandler {
+ // unused file provider : collateral effects of single sourcing, this File
+ // provider is compulsory for RAP file handler
+ public FileHandler(FileProvider jfp) {
- public void openFile(String fileName, InputStream is) {
+ public void openFile(String fileName, String fileId, InputStream is) {
String prefix = "", extension = "";
if (fileName != null) {
String prefix = "", extension = "";
if (fileName != null) {
- public void openFile(File file) {
+ private void openFile(File file) {
try {
Desktop desktop = null;
if (Desktop.isDesktopSupported()) {
try {
Desktop desktop = null;
if (Desktop.isDesktopSupported()) {
--- /dev/null
+package org.argeo.eclipse.ui.specific;
+
+/**
+ * Used for file download : subclasses must implement model specific methods to
+ * get a byte array representing a file given is ID.
+ *
+ * @author bsinou
+ *
+ */
+public interface FileProvider {
+
+ public byte[] getByteArrayFileFromId(String fileId);
+
+}