Skip to content

Commit

Permalink
* Updated version to 1.0.4
Browse files Browse the repository at this point in the history
* Backwards compatibility for Java 6: change JList<Object> to JList
* Fix: hide Windows OS.AllowSetForegroundWindow call with reflection, so it does not cause problems on non-Windows platforms
* Internal: @SuppressWarnings for old API code generated by Axis
* Internal: Avoid BufferedReader resource leak warning
  • Loading branch information
stevekmcc committed Oct 24, 2012
1 parent 983d3cf commit 6aef6cf
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 15 deletions.
2 changes: 1 addition & 1 deletion com.metacase.graphbrowser/META-INF/MANIFEST.MF
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Graph Browser
Bundle-SymbolicName: com.metacase.graphbrowser;singleton:=true
Bundle-Version: 1.0.3
Bundle-Version: 1.0.4
Bundle-Activator: com.metacase.graphbrowser.Activator
Bundle-Vendor: MetaCase
Require-Bundle: org.eclipse.ui,
Expand Down
1 change: 1 addition & 0 deletions com.metacase.graphbrowser/src/com/metacase/API/MEAny.java
Expand Up @@ -13,6 +13,7 @@

package com.metacase.API;

@SuppressWarnings({"rawtypes", "serial", "unused"})
public class MEAny implements java.io.Serializable {
private java.lang.String meType;

Expand Down
1 change: 1 addition & 0 deletions com.metacase.graphbrowser/src/com/metacase/API/MENull.java
Expand Up @@ -12,6 +12,7 @@

package com.metacase.API;

@SuppressWarnings({"rawtypes", "serial", "unused"})
public class MENull implements java.io.Serializable {
public MENull() {
}
Expand Down
1 change: 1 addition & 0 deletions com.metacase.graphbrowser/src/com/metacase/API/MEOop.java
Expand Up @@ -12,6 +12,7 @@

package com.metacase.API;

@SuppressWarnings({"rawtypes", "serial", "unused"})
public class MEOop implements java.io.Serializable {
private int areaID;

Expand Down
1 change: 1 addition & 0 deletions com.metacase.graphbrowser/src/com/metacase/API/METype.java
Expand Up @@ -12,6 +12,7 @@

package com.metacase.API;

@SuppressWarnings({"serial","rawtypes","unused"})
public class METype implements java.io.Serializable {
private java.lang.String name;

Expand Down
Expand Up @@ -12,6 +12,7 @@

package com.metacase.API;

@SuppressWarnings({"rawtypes", "serial", "unchecked"})
public class MetaEditAPILocator extends org.apache.axis.client.Service implements MetaEditAPI {

public MetaEditAPILocator() {
Expand Down
Expand Up @@ -12,8 +12,9 @@

package com.metacase.API;

import org.eclipse.swt.internal.win32.OS;
// import org.eclipse.swt.internal.win32.OS;

@SuppressWarnings({"rawtypes", "unchecked", "unused"})
public class MetaEditAPISoapBindingStub extends org.apache.axis.client.Stub implements MetaEditAPIPortType {
private java.util.Vector cachedSerClasses = new java.util.Vector();
private java.util.Vector cachedSerQNames = new java.util.Vector();
Expand Down Expand Up @@ -1935,7 +1936,11 @@ public MetaEditAPISoapBindingStub(javax.xml.rpc.Service service) throws org.apac
}

protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
OS.AllowSetForegroundWindow(-1);
try {
// OS.AllowSetForegroundWindow(-1);
Class.forName("org.eclipse.swt.internal.win32.OS").getMethod("AllowSetForegroundWindow", int.class).invoke(null, -1);
}
catch (Exception e) {}
try {
org.apache.axis.client.Call _call = super._createCall();
if (super.maintainSessionSet) {
Expand Down
Expand Up @@ -14,29 +14,34 @@ public class IniHandler {
*/
public IniHandler(String _iniPath) {
FileInputStream fis = null;
BufferedReader br = null;
String strLine = null;
this.iniFilePath = _iniPath;
File iniFile = new File(this.iniFilePath);

if (iniFile.exists()) {
try {
try {
fis = new FileInputStream(iniFile);
DataInputStream in = new DataInputStream(fis);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
while ((strLine = br.readLine()) != null) {
strLine = strLine.trim();
int equalsIndex = strLine.indexOf("=");
if (!strLine.isEmpty() && !strLine.startsWith("#") && equalsIndex != -1) {
values.put(strLine.substring(0, equalsIndex), strLine.substring(equalsIndex+1));
}
DataInputStream in = new DataInputStream(fis);
br = new BufferedReader(new InputStreamReader(in));
while ((strLine = br.readLine()) != null) {
strLine = strLine.trim();
int equalsIndex = strLine.indexOf("=");
if (!strLine.isEmpty() && !strLine.startsWith("#") && equalsIndex != -1) {
values.put(strLine.substring(0, equalsIndex), strLine.substring(equalsIndex+1));
}
}
} catch (Exception e) {
e.printStackTrace();
}
finally {
if (fis != null) {
try {
fis.close();
if (br != null) {
br.close();
} else {
fis.close();
}
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
Expand Up @@ -16,7 +16,7 @@ public class SelectionDialog extends JPanel {
* JPanel for selecting MetaEdit+ projects from given database.
*/
private static final long serialVersionUID = 1L;
JList<Object> itemsList;
JList itemsList;
JLabel topLabel;
JButton selectAllButton;
JButton OKbutton, cancelButton;
Expand Down Expand Up @@ -50,7 +50,7 @@ public SelectionDialog (final JFrame _parent, List<String> items, boolean single
} else {
labelStr = headerOkString;
}
itemsList = new JList<Object>(items.toArray());
itemsList = new JList(items.toArray());
if (singleSelection) itemsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
itemCount = items.size();

Expand Down

0 comments on commit 6aef6cf

Please sign in to comment.