Skip to content

Commit d42b777

Browse files
committed
scala: removed old java code
1 parent f3456a1 commit d42b777

8 files changed

+1
-449
lines changed
Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package org.knime.ext.jruby
2+
23
import org.knime.core.node.NodeLogger
34
import java.io.Writer
45

@@ -28,60 +29,4 @@ class LoggerOutputStream(
2829
case _ => logger.debug(str)
2930
}
3031
}
31-
32-
/*
33-
Original Java:
34-
package org.knime.ext.jruby;
35-
36-
import java.io.IOException;
37-
38-
import org.knime.core.node.NodeLogger;
39-
import java.io.Writer;
40-
41-
public class LoggerOutputStream extends Writer {
42-
43-
private NodeLogger logger;
44-
private NodeLogger.LEVEL level;
45-
46-
public LoggerOutputStream(NodeLogger inLogger) {
47-
this.logger = inLogger;
48-
this.level = null;
49-
}
50-
51-
public LoggerOutputStream(NodeLogger inLogger, NodeLogger.LEVEL inLevel) {
52-
this.logger = inLogger;
53-
this.level = inLevel;
54-
}
55-
56-
@Override
57-
public void close() throws IOException {
58-
}
59-
60-
@Override
61-
public void flush() throws IOException {
62-
}
63-
64-
@Override
65-
public final void write(char[] b, int off, int len) throws IOException {
66-
String str = new String(b, off, len);
67-
68-
// prevent output of empty strings
69-
if (str.endsWith("\n")) {
70-
str = str.substring(0, str.length()-1);
71-
}
72-
if (str.length() == 0) return;
73-
74-
if (level == NodeLogger.LEVEL.INFO) {
75-
logger.info(str);
76-
} else if (level == NodeLogger.LEVEL.WARN) {
77-
logger.warn(str);
78-
} else if (level == NodeLogger.LEVEL.ERROR) {
79-
logger.error(str);
80-
} else {
81-
logger.debug(str);
82-
}
83-
}
8432
}
85-
86-
*/
87-
}

RubyScript/src/org/knime/ext/jruby/RubyScriptNodeFactory.scala

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -56,82 +56,4 @@ class RubyScriptNodeFactory extends NodeFactory[RubyScriptNodeModel] {
5656
dialog = new RubyScriptNodeDialog(this)
5757
dialog
5858
}
59-
60-
/*
61-
Original Java:
62-
|**
63-
* <code>NodeFactory</code> for the "RubyScript" Node.
64-
*
65-
*
66-
* @author rss
67-
*|
68-
package org.knime.ext.jruby;
69-
70-
import org.knime.core.node.NodeDialogPane;
71-
import org.knime.core.node.NodeFactory;
72-
import org.knime.core.node.NodeView;
73-
74-
public class RubyScriptNodeFactory extends NodeFactory<RubyScriptNodeModel> {
75-
76-
private RubyScriptNodeModel m_model;
77-
private RubyScriptNodeDialog m_dialog;
78-
79-
protected RubyScriptNodeModel setModel(RubyScriptNodeModel model) {
80-
m_model = model;
81-
return model;
82-
}
83-
84-
public RubyScriptNodeModel getModel() {
85-
return m_model;
86-
}
87-
88-
public RubyScriptNodeDialog getDialog() {
89-
return m_dialog;
90-
}
91-
92-
|**
93-
* {@inheritDoc}
94-
*|
95-
@Override
96-
public RubyScriptNodeModel createNodeModel() {
97-
return setModel(new RubyScriptNodeModel(1, 1, false));
98-
}
99-
100-
|**
101-
* {@inheritDoc}
102-
*|
103-
@Override
104-
public final int getNrNodeViews() {
105-
return 0;
106-
}
107-
108-
|**
109-
* {@inheritDoc}
110-
*|
111-
@Override
112-
public final NodeView<RubyScriptNodeModel> createNodeView(final int viewIndex,
113-
final RubyScriptNodeModel nodeModel) {
114-
//return new RubyScriptNodeView(nodeModel);
115-
return null;
116-
}
117-
118-
|**
119-
* {@inheritDoc}
120-
*|
121-
@Override
122-
public final boolean hasDialog() {
123-
return true;
124-
}
125-
126-
|**
127-
* {@inheritDoc}
128-
*|
129-
@Override
130-
public final NodeDialogPane createNodeDialogPane() {
131-
m_dialog = new RubyScriptNodeDialog(this);
132-
return m_dialog;
133-
}
13459
}
135-
136-
*/
137-
}

RubyScript/src/org/knime/ext/jruby/RubyScriptNodeFactory01.scala

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,4 @@ class RubyScriptNodeFactory01 extends RubyScriptNodeFactory {
1414
override def createNodeModel(): RubyScriptNodeModel = {
1515
setModel(new RubyScriptNodeModel(0, 1, false))
1616
}
17-
18-
/*
19-
Original Java:
20-
package org.knime.ext.jruby;
21-
22-
|**
23-
* <code>NodeFactory</code> for the "RubyScript" Node.
24-
*
25-
*
26-
* @author
27-
*|
28-
public class RubyScriptNodeFactory01 extends RubyScriptNodeFactory {
29-
30-
|**
31-
* {@inheritDoc}
32-
*|
33-
@Override
34-
public final RubyScriptNodeModel createNodeModel() {
35-
return setModel(new RubyScriptNodeModel(0, 1, false));
36-
}
3717
}
38-
39-
*/
40-
}

RubyScript/src/org/knime/ext/jruby/RubyScriptNodeFactory22.scala

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,4 @@ class RubyScriptNodeFactory22 extends RubyScriptNodeFactory {
1414
override def createNodeModel(): RubyScriptNodeModel = {
1515
setModel(new RubyScriptNodeModel(2, 2, false))
1616
}
17-
18-
/*
19-
Original Java:
20-
package org.knime.ext.jruby;
21-
22-
|**
23-
* <code>NodeFactory</code> for the "RubyScript" Node.
24-
*
25-
*
26-
* @author
27-
*|
28-
public class RubyScriptNodeFactory22 extends RubyScriptNodeFactory {
29-
30-
|**
31-
* {@inheritDoc}
32-
*|
33-
@Override
34-
public final RubyScriptNodeModel createNodeModel() {
35-
return setModel(new RubyScriptNodeModel(2, 2, false));
36-
}
3717
}
38-
39-
*/
40-
}

RubyScript/src/org/knime/ext/jruby/RubyScriptNodePlugin.scala

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -38,74 +38,4 @@ class RubyScriptNodePlugin extends AbstractUIPlugin() {
3838
super.stop(context)
3939
plugin = null
4040
}
41-
42-
/*
43-
Original Java:
44-
|* @(#)$RCSfile$
45-
* $Revision$ $Date$ $Author$
46-
*
47-
*|
48-
package org.knime.ext.jruby;
49-
50-
import org.eclipse.ui.plugin.AbstractUIPlugin;
51-
import org.osgi.framework.BundleContext;
52-
53-
|**
54-
* This is the eclipse bundle activator. Note: KNIME node developers probably
55-
* won't have to do anything in here, as this class is only needed by the
56-
* eclipse platform/plugin mechanism. If you want to move/rename this file, make
57-
* sure to change the plugin.xml file in the project root directory accordingly.
58-
*
59-
* @author
60-
*|
61-
public class RubyScriptNodePlugin extends AbstractUIPlugin {
62-
// The shared instance.
63-
private static RubyScriptNodePlugin plugin;
64-
65-
|**
66-
* The constructor.
67-
*|
68-
public RubyScriptNodePlugin() {
69-
super();
70-
plugin = this;
71-
}
72-
73-
|**
74-
* This method is called upon plug-in activation.
75-
*
76-
* @param context
77-
* The OSGI bundle context
78-
* @throws Exception
79-
* If this plugin could not be started
80-
*|
81-
@Override
82-
public final void start(final BundleContext context) throws Exception {
83-
super.start(context);
84-
}
85-
86-
|**
87-
* This method is called when the plug-in is stopped.
88-
*
89-
* @param context
90-
* The OSGI bundle context
91-
* @throws Exception
92-
* If this plugin could not be stopped
93-
*|
94-
@Override
95-
public final void stop(final BundleContext context) throws Exception {
96-
super.stop(context);
97-
plugin = null;
98-
}
99-
100-
|**
101-
* Returns the shared instance.
102-
*
103-
* @return Singleton instance of the Plugin
104-
*|
105-
public static RubyScriptNodePlugin getDefault() {
106-
return plugin;
107-
}
10841
}
109-
110-
*/
111-
}

RubyScript/src/org/knime/ext/jruby/RubyScriptNodeView.scala

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -28,69 +28,4 @@ class RubyScriptNodeView protected (nodeModel: RubyScriptNodeModel) extends Node
2828
*/
2929
protected override def onOpen() {
3030
}
31-
32-
/*
33-
Original Java:
34-
package org.knime.ext.jruby;
35-
36-
import org.knime.core.node.NodeView;
37-
38-
|**
39-
* <code>NodeView</code> for the "RubyScript" Node.
40-
*
41-
*
42-
* @author
43-
*|
44-
public class RubyScriptNodeView extends NodeView<RubyScriptNodeModel> {
45-
46-
|**
47-
* Creates a new view.
48-
*
49-
* @param nodeModel
50-
* The model (class: {@link RubyScriptNodeModel})
51-
*|
52-
protected RubyScriptNodeView(final RubyScriptNodeModel nodeModel) {
53-
super(nodeModel);
54-
55-
// TODO instantiate the components of the view here.
56-
57-
}
58-
59-
|**
60-
* {@inheritDoc}
61-
*|
62-
@Override
63-
protected final void modelChanged() {
64-
65-
// TODO retrieve the new model from your nodemodel and
66-
// update the view.
67-
RubyScriptNodeModel nodeModel = (RubyScriptNodeModel) getNodeModel();
68-
assert nodeModel != null;
69-
70-
// be aware of a possibly not executed nodeModel! The data you retrieve
71-
// from your nodemodel could be null, emtpy, or invalid in any kind.
72-
73-
}
74-
75-
|**
76-
* {@inheritDoc}
77-
*|
78-
@Override
79-
protected void onClose() {
80-
81-
// TODO things to do when closing the view
82-
}
83-
84-
|**
85-
* {@inheritDoc}
86-
*|
87-
@Override
88-
protected void onOpen() {
89-
90-
// TODO things to do when opening the view
91-
}
92-
9331
}
94-
95-
*/
96-
}

RubyScript/src/org/knime/ext/jruby/RubySnippetNodeFactory.scala

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,4 @@ class RubySnippetNodeFactory extends RubyScriptNodeFactory {
1414
override def createNodeModel(): RubyScriptNodeModel = {
1515
setModel(new RubyScriptNodeModel(1, 1, true))
1616
}
17-
18-
/*
19-
Original Java:
20-
package org.knime.ext.jruby;
21-
22-
|**
23-
* <code>NodeFactory</code> for the "RubyScript" Node.
24-
*
25-
*
26-
* @author
27-
*|
28-
public class RubySnippetNodeFactory extends RubyScriptNodeFactory {
29-
30-
|**
31-
* {@inheritDoc}
32-
*|
33-
@Override
34-
public final RubyScriptNodeModel createNodeModel() {
35-
return setModel(new RubyScriptNodeModel(1, 1, true));
36-
}
3717
}
38-
39-
*/
40-
}

0 commit comments

Comments
 (0)