Skip to content

Commit

Permalink
Release 0.2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hajdam committed Aug 15, 2019
1 parent 8d657b2 commit fe502f5
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 67 deletions.
2 changes: 1 addition & 1 deletion bined-jdeveloper-extension.jpr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<value n="oracle.adfdtinternal.view.common.migration.wizards.MigrationHelper" v="11.1.1.1.0.3"/>
<value n="oracle.adfdtinternal.view.rich.migration.ComponentIdNodeMigratorHelper" v="11.1.1.1.0.01"/>
<value n="oracle.adfdtinternal.view.rich.migration.LibraryVersionMigrator" v="11.1.1.1.0.1"/>
<value n="oracle.ide.model.Project" v="11.1.2.0.0;12.2.1.3.0"/>
<value n="oracle.ide.model.Project" v="11.1.2.0.0;12.2.1.0.0;12.2.1.3.0"/>
<value n="oracle.ide.model.ResourcePathsMigrator" v="11.1.1.1.0"/>
<value n="oracle.ideimpl.model.TechnologyScopeUpdateMigrator" v="11.1.2.0.0.4;11.1.2.0.0.6"/>
<value n="oracle.jbo.dt.jdevx.deployment.JbdProjectMigrator" v="11.1.2.0.0"/>
Expand Down
2 changes: 1 addition & 1 deletion changes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0.2.0.1
0.2.0.1 (2019-08-15)
- Fixed issue with limitation to single editor only
- Added legacy version for 11g

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
</list>
<value n="bundleManifestVersion" v="2.0.0"/>
<value n="bundleSymbolicName" v="org.exbin.bined.jdeveloper"/>
<value n="bundleVersion" v="0.2.0"/>
<value n="bundleVersion" v="0.2.0.1"/>
<value n="hasManifest" v="true"/>
</hash>
<hash n="exportDefinition">
Expand Down Expand Up @@ -136,6 +136,10 @@
</hash>
</list>
</hash>
<hash n="importDefinition">
<hash n="contributors"/>
<hash n="rules"/>
</hash>
<url n="jarURL" path="../../../app/Oracle/Middleware/jdeveloper/jdev/extensions/org.exbin.bined.jdeveloper.jar"/>
<hash n="libraryDependencies">
<value n="IncludeLibrariesFromOtherContainers" v="true"/>
Expand Down Expand Up @@ -165,6 +169,13 @@
<string v="edtExtensionProfile"/>
</list>
</hash>
<hash n="oracle.jdeveloper.model.J2eeSettings">
<hash n="webContentSet">
<list n="url-path">
<url path="public_html/"/>
</list>
</hash>
</hash>
<hash n="oracle.jdeveloper.model.PathsConfiguration">
<hash n="javaContentSet">
<list n="constituent-sets"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

import com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode;

import java.io.IOException;

import java.net.MalformedURLException;
import java.net.URL;

Expand All @@ -27,23 +29,19 @@

import oracle.ide.model.Node;

import oracle.javatools.icons.OracleIcons;

/**
* Node used for binary data.
*
* Not sure how to force JDeveloper to ignore Node so let's use fake URL.
*
* Report as data: instead of file: so that no additional tabs will be opened.
*
* @author ExBin Project (http://exbin.org)
* @version 0.2.0 2019/08/14
* @version 0.2.0 2019/08/15
*/
public class BinaryNode extends Node {

private static final String FAKE_PROTOCOL = "orgexbinbined";
private static final URLStreamHandler FAKE_PROTOCOL_HANDLER = new URLStreamHandler() {
@Override
protected URLConnection openConnection(URL u) {
return FAKE_PROTOCOL.equals(u.getProtocol()) ? new FakeURLStreamHandler(u) : null;
}
};
private static final String WRAPPED_PREFIX = "orgexbinbined::/"; // Prevent existence of the real file URL

private Node wrappedNode;

Expand Down Expand Up @@ -74,7 +72,7 @@ public String getLongLabel() {
public Icon getIcon() {
if (wrappedNode == null) return super.getIcon();

return wrappedNode.getIcon();
return new javax.swing.ImageIcon(getClass().getResource("/org/exbin/bined/jdeveloper/resources/icons/icon.png"));
}

@Override
Expand All @@ -90,19 +88,10 @@ public URL getURL() {

URL wrappedUrl = wrappedNode.getURL();
try {
return new URL(FAKE_PROTOCOL, wrappedUrl.getHost(), wrappedUrl.getPort(), wrappedUrl.getProtocol() + "/" + wrappedUrl.getFile(), FAKE_PROTOCOL_HANDLER);
return new URL(wrappedUrl.getProtocol(), wrappedUrl.getHost(), wrappedUrl.getPort(), WRAPPED_PREFIX + wrappedUrl.getFile());
} catch (MalformedURLException e) {
return super.getURL();
}
}

private static class FakeURLStreamHandler extends URLConnection {
public FakeURLStreamHandler(URL url) {
super(url);
}

@Override
public void connect() {
}
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,21 @@

import oracle.ide.Context;
import oracle.ide.Ide;
import oracle.ide.controller.Controller;
import oracle.ide.controller.IdeAction;
import oracle.ide.editor.Editor;
import oracle.ide.controller.TriggerController;
import oracle.ide.editor.EditorManager;
import oracle.ide.editor.OpenEditorOptions;
import oracle.ide.extension.RegisteredByExtension;
import oracle.ide.model.Element;
import oracle.ide.model.Locatable;

/**
* Controller for action org.exbin.bined.jdeveloper.openasbinary.
*
*
* @version 0.2.0 2019/08/11
* @author ExBin Project (http://exbin.org)
*/
@RegisteredByExtension("org.exbin.bined.jdeveloper")
public final class OpenAsBinaryController implements Controller {
public final class OpenAsBinaryController implements TriggerController {

private static final String OPEN_AS_BINARY_ID = "org.exbin.bined.jdeveloper.openAsBinaryAction";
static final int OPEN_AS_BINARY_CMD_ID = Ide.findOrCreateCmdID(OPEN_AS_BINARY_ID);
Expand Down Expand Up @@ -64,6 +62,11 @@ public boolean update(IdeAction action, Context context) {
return true;
}

@Override
public Object getInvalidStateMessage(IdeAction action, Context context) {
return "Unknown error";
}

private boolean actionIsEnabled(Context context) {
final Element[] selection = context.getSelection();
if (selection == null || selection.length != 1 ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@
import oracle.ide.controller.Controller;
import oracle.ide.controller.IdeAction;
import oracle.ide.dialogs.DialogUtil;
import oracle.ide.editor.Editor;
import oracle.ide.editor.EditorManager;
import oracle.ide.editor.OpenEditorOptions;
import oracle.ide.extension.RegisteredByExtension;
import oracle.ide.model.Element;
import oracle.ide.model.Locatable;
import oracle.ide.model.Node;
import oracle.ide.net.URLChooser;

Expand Down
35 changes: 12 additions & 23 deletions src/org/exbin/bined/jdeveloper/BinaryNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

import com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode;

import java.io.IOException;

import java.net.MalformedURLException;
import java.net.URL;

Expand All @@ -27,23 +29,19 @@

import oracle.ide.model.Node;

import oracle.javatools.icons.OracleIcons;

/**
* Node used for binary data.
*
* Not sure how to force JDeveloper to ignore Node so let's use fake URL.
*
* Report as data: instead of file: so that no additional tabs will be opened.
*
* @author ExBin Project (http://exbin.org)
* @version 0.2.0 2019/08/14
* @version 0.2.0 2019/08/15
*/
public class BinaryNode extends Node {

private static final String FAKE_PROTOCOL = "orgexbinbined";
private static final URLStreamHandler FAKE_PROTOCOL_HANDLER = new URLStreamHandler() {
@Override
protected URLConnection openConnection(URL u) {
return FAKE_PROTOCOL.equals(u.getProtocol()) ? new FakeURLStreamHandler(u) : null;
}
};
private static final String WRAPPED_PREFIX = "orgexbinbined::/"; // Prevent existence of the real file URL

private Node wrappedNode;

Expand Down Expand Up @@ -74,7 +72,7 @@ public String getLongLabel() {
public Icon getIcon() {
if (wrappedNode == null) return super.getIcon();

return wrappedNode.getIcon();
return new javax.swing.ImageIcon(getClass().getResource("/org/exbin/bined/jdeveloper/resources/icons/icon.png"));
}

@Override
Expand All @@ -90,19 +88,10 @@ public URL getURL() {

URL wrappedUrl = wrappedNode.getURL();
try {
return new URL(FAKE_PROTOCOL, wrappedUrl.getHost(), wrappedUrl.getPort(), wrappedUrl.getProtocol() + "/" + wrappedUrl.getFile(), FAKE_PROTOCOL_HANDLER);
return new URL(wrappedUrl.getProtocol(), wrappedUrl.getHost(), wrappedUrl.getPort(), WRAPPED_PREFIX + wrappedUrl.getFile());
} catch (MalformedURLException e) {
return super.getURL();
}
}

private static class FakeURLStreamHandler extends URLConnection {
public FakeURLStreamHandler(URL url) {
super(url);
}

@Override
public void connect() {
}
}
}
}

13 changes: 8 additions & 5 deletions src/org/exbin/bined/jdeveloper/OpenAsBinaryController.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,21 @@

import oracle.ide.Context;
import oracle.ide.Ide;
import oracle.ide.controller.Controller;
import oracle.ide.controller.IdeAction;
import oracle.ide.editor.Editor;
import oracle.ide.controller.TriggerController;
import oracle.ide.editor.EditorManager;
import oracle.ide.editor.OpenEditorOptions;
import oracle.ide.extension.RegisteredByExtension;
import oracle.ide.model.Element;
import oracle.ide.model.Locatable;

/**
* Controller for action org.exbin.bined.jdeveloper.openasbinary.
*
*
* @version 0.2.0 2019/08/11
* @author ExBin Project (http://exbin.org)
*/
@RegisteredByExtension("org.exbin.bined.jdeveloper")
public final class OpenAsBinaryController implements Controller {
public final class OpenAsBinaryController implements TriggerController {

private static final String OPEN_AS_BINARY_ID = "org.exbin.bined.jdeveloper.openAsBinaryAction";
static final int OPEN_AS_BINARY_CMD_ID = Ide.findOrCreateCmdID(OPEN_AS_BINARY_ID);
Expand Down Expand Up @@ -64,6 +62,11 @@ public boolean update(IdeAction action, Context context) {
return true;
}

@Override
public Object getInvalidStateMessage(IdeAction action, Context context) {
return "Unknown error";
}

private boolean actionIsEnabled(Context context) {
final Element[] selection = context.getSelection();
if (selection == null || selection.length != 1 ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@
import oracle.ide.controller.Controller;
import oracle.ide.controller.IdeAction;
import oracle.ide.dialogs.DialogUtil;
import oracle.ide.editor.Editor;
import oracle.ide.editor.EditorManager;
import oracle.ide.editor.OpenEditorOptions;
import oracle.ide.extension.RegisteredByExtension;
import oracle.ide.model.Element;
import oracle.ide.model.Locatable;
import oracle.ide.model.Node;
import oracle.ide.net.URLChooser;

Expand Down

0 comments on commit fe502f5

Please sign in to comment.