Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update defaultserver to new py4j namespace #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions net.sf.py4j.defaultserver/META-INF/MANIFEST.MF

This file was deleted.

1 change: 0 additions & 1 deletion net.sf.py4j/py4j
Submodule py4j deleted from 8be614
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.sf.py4j.defaultserver.feature</name>
<name>org.py4j.defaultserver.feature</name>
<comment></comment>
<projects>
</projects>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="net.sf.py4j.defaultserver.feature"
id="org.py4j.defaultserver.feature"
label="Py4J Default Server"
version="0.9.0.qualifier"
version="1.0.0.qualifier"
provider-name="Py4J">

<description url="https://www.py4j.org/">
Expand Down Expand Up @@ -55,11 +55,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</url>

<requires>
<import feature="net.sf.py4j.feature" version="0.8.0.qualifier"/>
<import feature="org.py4j.feature" version="0.10.6"/>
</requires>

<plugin
id="net.sf.py4j.defaultserver"
id="org.py4j.defaultserver"
download-size="0"
install-size="0"
version="0.0.0"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.sf.py4j.defaultserver</name>
<name>org.py4j.defaultserver</name>
<comment></comment>
<projects>
</projects>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
14 changes: 14 additions & 0 deletions org.py4j.defaultserver/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Py4J Default Server
Bundle-SymbolicName: org.py4j.defaultserver;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.py4j.defaultserver.DefaultServerActivator
Bundle-Vendor: Py4J
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
py4j-java
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.py4j.defaultserver,
org.py4j.defaultserver.preferences
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<extension
point="org.eclipse.ui.startup">
<startup
class="net.sf.py4j.defaultserver.DefaultServerStartup">
class="org.py4j.defaultserver.DefaultServerStartup">
</startup>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="net.sf.py4j.defaultserver.preferences.DefaultServerPreferencePage"
id="net.sf.py4j.defaultserver.preferences.DefaultServerPreferencePage"
class="org.py4j.defaultserver.preferences.DefaultServerPreferencePage"
id="org.py4j.defaultserver.preferences.DefaultServerPreferencePage"
name="Py4J Default Server">
</page>
</extension>
<extension
point="org.eclipse.core.runtime.preferences">
<initializer
class="net.sf.py4j.defaultserver.preferences.PreferenceInitializer">
class="org.py4j.defaultserver.preferences.PreferenceInitializer">
</initializer>
</extension>
<extension
Expand All @@ -29,7 +29,7 @@
thread="main"
visible="true">
<run
class="net.sf.py4j.defaultserver.HeadlessApplication">
class="org.py4j.defaultserver.HeadlessApplication">
</run>
</application>
</extension>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package net.sf.py4j.defaultserver;
package org.py4j.defaultserver;

import java.io.IOException;
import java.net.DatagramSocket;
import java.net.ServerSocket;

import net.sf.py4j.defaultserver.preferences.PreferenceConstants;

import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.py4j.defaultserver.preferences.PreferenceConstants;

import py4j.GatewayServer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.sf.py4j.defaultserver;
package org.py4j.defaultserver;

import org.eclipse.ui.IStartup;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package net.sf.py4j.defaultserver;
package org.py4j.defaultserver;

import java.util.concurrent.CountDownLatch;

import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;

import py4j.GatewayConnection;
import py4j.GatewayServer;
import py4j.GatewayServerListener;
import py4j.Py4JServerConnection;

public class HeadlessApplication implements IApplication, GatewayServerListener {

Expand Down Expand Up @@ -60,20 +60,20 @@ public void serverPostShutdown() {
}

@Override
public void connectionStarted(GatewayConnection gatewayConnection) {
public void connectionError(Exception e) {

}

@Override
public void connectionStopped(GatewayConnection gatewayConnection) {
public void connectionStarted(Py4JServerConnection gatewayConnection) {
// TODO Auto-generated method stub

}

@Override
public void connectionError(Exception e) {
public void connectionStopped(Py4JServerConnection gatewayConnection) {
// TODO Auto-generated method stub

}



}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.sf.py4j.defaultserver;
package org.py4j.defaultserver;

import java.io.BufferedReader;
import java.io.BufferedWriter;
Expand Down Expand Up @@ -70,7 +70,7 @@ public void execute(final String commandName, final BufferedReader reader,
// We wait for 5s by default for the method to get to the top of the
// stack and return.
final int waitTime = Integer.getInteger(
"net.sf.py4j.defaultserver.waitTime", 5000);
"org.py4j.defaultserver.waitTime", 5000);
while (runner.isActive()) {
try {
Thread.sleep(100);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.sf.py4j.defaultserver;
package org.py4j.defaultserver;

import java.io.IOException;
import java.net.Socket;
Expand Down Expand Up @@ -57,7 +57,7 @@ public void run() {
logger.log(Level.WARNING,
"Error occurred while waiting for a command.", e);
if (executing && writer != null) {
quietSendError(writer, e);
quietSendFatalError(writer, e);
}
} finally {
NetworkUtil.quietlyClose(socket);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.sf.py4j.defaultserver;
package org.py4j.defaultserver;

import java.io.IOException;
import java.net.Socket;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package net.sf.py4j.defaultserver.preferences;

import net.sf.py4j.defaultserver.DefaultServerActivator;
package org.py4j.defaultserver.preferences;

import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.runtime.IStatus;
Expand All @@ -21,6 +19,7 @@
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
import org.py4j.defaultserver.DefaultServerActivator;

/**
* This class represents a preference page that is contributed to the
Expand Down Expand Up @@ -105,7 +104,7 @@ public void widgetSelected(SelectionEvent e) {
.executeWithChecks(new ExecutionEvent());
} catch (Throwable t) {
Status status = new Status(IStatus.ERROR,
"net.sf.py4j.defaultserver", "Unable to restart", t);
"org.py4j.defaultserver", "Unable to restart", t);
ErrorDialog.openError(
Display.getDefault().getActiveShell(),
"Unable to restart",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.sf.py4j.defaultserver.preferences;
package org.py4j.defaultserver.preferences;

import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.swt.layout.GridData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.sf.py4j.defaultserver.preferences;
package org.py4j.defaultserver.preferences;

/**
* Constant definitions for plug-in preferences
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package net.sf.py4j.defaultserver.preferences;
package org.py4j.defaultserver.preferences;

import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
import org.py4j.defaultserver.DefaultServerActivator;

import py4j.GatewayServer;

import net.sf.py4j.defaultserver.DefaultServerActivator;

/**
* Class used to initialize default preference values.
*/
Expand Down