Skip to content

Commit

Permalink
Merge branch 'release/7.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rmknopf committed May 24, 2016
2 parents 8b5bcc3 + 78965c1 commit 073996d
Show file tree
Hide file tree
Showing 59 changed files with 4,975 additions and 2,980 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ dependencies {
compile 'org.apache.tika:tika-core:1.11'
}

task wrapper(type: Wrapper) { gradleVersion = '2.8' }
task wrapper(type: Wrapper) { gradleVersion = '2.12' }

apply from: 'gradle/wsimport.gradle'
apply from: 'gradle/props.gradle'
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=7.1.0
group=com.rapidminer.studio
version=7.1.1
group=com.rapidminer.studio
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Nov 05 09:40:00 CET 2015
#Mon Apr 04 13:41:22 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ echo location of your Java installation.
goto fail

:init
@rem Get command-line arguments, handling Windowz variants
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/rapidminer/Process.java
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ protected void loadInitialData(final int firstPort) throws UserError {
} else {
getLogger().info(
"Cannot assigning " + loc + " to input port " + port.getSpec()
+ ": Repository location does not reference an IOObject entry.");
+ ": Repository location does not reference an IOObject entry.");
throw new PortUserError(port, 312, loc, "Not an IOObject entry.");
}
} catch (RepositoryException e) {
Expand Down Expand Up @@ -1106,6 +1106,7 @@ public final IOContainer run(final IOContainer input, int logVerbosity, final Ma
getLogger().removeHandler(logHandler);
logHandler.close();
}
ActionStatisticsCollector.getInstance().logExecutionFinished(this);
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/rapidminer/RapidMiner.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@ public boolean isLoadingManagedExtensions() {
*/
public static final String PROPERTY_RAPIDMINER_TOOLS_DB_ONLY_STANDARD_TABLES = "rapidminer.tools.db.assist.show_only_standard_tables";

/**
* The property name for the JDBC login timeout setting. This is a global setting in the
* DriverManager and may be used differently by the JDBC drivers.
*/
public static final String PROPERTY_RAPIDMINER_TOOLS_DB_LOGIN_TIMEOUT = "rapidminer.tools.db.login.timeout";
public static final int DB_LOGIN_TIMEOUT_DEFAULT = 60;

/**
* The property name for "Use unix special characters for logfile highlighting (requires
* new RapidMiner instance)."
Expand Down Expand Up @@ -426,6 +433,8 @@ public boolean isLoadingManagedExtensions() {
registerParameter(new ParameterTypePassword(PROPERTY_RAPIDMINER_TOOLS_SMTP_PASSWD, ""));

registerParameter(new ParameterTypeBoolean(PROPERTY_RAPIDMINER_TOOLS_DB_ONLY_STANDARD_TABLES, "", true));
registerParameter(new ParameterTypeInt(PROPERTY_RAPIDMINER_TOOLS_DB_LOGIN_TIMEOUT, "", 0, Integer.MAX_VALUE,
DB_LOGIN_TIMEOUT_DEFAULT));

RapidMiner.registerParameter(new ParameterTypeBoolean(PROPERTY_RAPIDMINER_INIT_PLUGINS, "", true));
RapidMiner.registerParameter(new ParameterTypeDirectory(PROPERTY_RAPIDMINER_INIT_PLUGINS_LOCATION, "", true));
Expand Down
77 changes: 58 additions & 19 deletions src/main/java/com/rapidminer/example/set/SortedExampleSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@
*/
package com.rapidminer.example.set;

import com.rapidminer.example.Attribute;
import com.rapidminer.example.Attributes;
import com.rapidminer.example.Example;
import com.rapidminer.example.ExampleSet;
import com.rapidminer.example.table.ExampleTable;
import com.rapidminer.operator.Annotations;
import com.rapidminer.tools.Ontology;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -34,6 +26,16 @@
import java.util.Iterator;
import java.util.List;

import com.rapidminer.example.Attribute;
import com.rapidminer.example.Attributes;
import com.rapidminer.example.Example;
import com.rapidminer.example.ExampleSet;
import com.rapidminer.example.table.ExampleTable;
import com.rapidminer.operator.Annotations;
import com.rapidminer.operator.OperatorProgress;
import com.rapidminer.operator.ProcessStoppedException;
import com.rapidminer.tools.Ontology;


/**
* <p>
Expand All @@ -42,7 +44,7 @@
* performance reasons this class simply use the given mapping. A convenience constructor exist to
* create a view based on the sorting based on a specific attribute.
* </p>
*
*
* @author Ingo Mierswa, Nils Woehler
*/
public class SortedExampleSet extends AbstractExampleSet {
Expand Down Expand Up @@ -93,25 +95,54 @@ public String toString() {
/** The used mapping. */
private int[] mapping;

public SortedExampleSet(ExampleSet parent, final Attribute sortingAttribute, int sortingDirection) {
public SortedExampleSet(ExampleSet parent, Attribute sortingAttribute, int sortingDirection) {
try {
createSortedExampleSet(parent, sortingAttribute, sortingDirection, null);
} catch (ProcessStoppedException e) {
// Cannot happen, OperatorProgress is null
}
}

public SortedExampleSet(ExampleSet parent, final Attribute sortingAttribute, int sortingDirection,
OperatorProgress progress) throws ProcessStoppedException {
createSortedExampleSet(parent, sortingAttribute, sortingDirection, progress);
}

/**
* Helper method for constructor
*/
private void createSortedExampleSet(ExampleSet parent, final Attribute sortingAttribute, int sortingDirection,
OperatorProgress progress) throws ProcessStoppedException {
this.parent = (ExampleSet) parent.clone();
List<SortingIndex> sortingIndex = new ArrayList<SortingIndex>(parent.size());
if (progress != null) {
progress.setTotal(100);
}

// create sort index
Integer counter = 0;
int exampleCounter = 0;
int progressTriggerCounter = 0;
Iterator<Example> i = parent.iterator();
while (i.hasNext()) {
Example example = i.next();
if (Ontology.ATTRIBUTE_VALUE_TYPE.isA(sortingAttribute.getValueType(), Ontology.DATE_TIME)) {
sortingIndex.add(new SortingIndex(example.getDateValue(sortingAttribute), counter));
sortingIndex.add(new SortingIndex(example.getDateValue(sortingAttribute), exampleCounter));
} else if (sortingAttribute.isNumerical()) {
sortingIndex.add(new SortingIndex(example.getNumericalValue(sortingAttribute), counter));
sortingIndex.add(new SortingIndex(example.getNumericalValue(sortingAttribute), exampleCounter));

} else {
sortingIndex.add(new SortingIndex(example.getNominalValue(sortingAttribute), counter));
sortingIndex.add(new SortingIndex(example.getNominalValue(sortingAttribute), exampleCounter));

}
counter++;
exampleCounter++;
progressTriggerCounter++;
if (progress != null && progressTriggerCounter > 2_000_000) {
progressTriggerCounter = 0;
progress.setCompleted((int) ((long) exampleCounter * 40 / parent.size()));
}
}
if (progress != null) {
progress.setCompleted(40);
}

// create comparator
Expand Down Expand Up @@ -154,15 +185,23 @@ public int compare(SortingIndex o1, SortingIndex o2) {
} else {
Collections.sort(sortingIndex, Collections.reverseOrder(sortComparator));
}
if (progress != null) {
progress.setCompleted(60);
}

// change mapping
int[] mapping = new int[parent.size()];
counter = 0;
exampleCounter = 0;
progressTriggerCounter = 0;
Iterator<SortingIndex> k = sortingIndex.iterator();
while (k.hasNext()) {
Integer index = k.next().getIndex();
mapping[counter] = index;
counter++;
mapping[exampleCounter++] = index;
progressTriggerCounter++;
if (progress != null && progressTriggerCounter > 2_000_000) {
progressTriggerCounter = 0;
progress.setCompleted((int) (60 + (long) exampleCounter * 40 / sortingIndex.size()));
}
}

this.mapping = mapping;
Expand Down Expand Up @@ -216,7 +255,7 @@ public Iterator<Example> iterator() {
/** Returns the i-th example in the mapping. */
@Override
public Example getExample(int index) {
if ((index < 0) || (index >= this.mapping.length)) {
if (index < 0 || index >= this.mapping.length) {
throw new RuntimeException("Given index '" + index + "' does not fit the mapped ExampleSet!");
} else {
return this.parent.getExample(this.mapping[index]);
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/rapidminer/gui/MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,9 @@ public TutorialSelector getTutorialSelector() {
* execution; {@code false} otherwise
*/
private boolean doesProcessContainShowstoppers() {
// prevent two bubbles on top of each other
getProcessPanel().getOperatorWarningHandler().killWarningBubble();

// if any operator has a mandatory parameter with no value and no default value. As it
// cannot predict execution behavior (e.g. Branch operators), this may turn up problems
// which would not occur during process execution
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/rapidminer/gui/RapidMinerGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public class RapidMinerGUI extends RapidMiner {
RapidMiner.registerParameter(new ParameterTypeBoolean(PROPERTY_DISCONNECT_ON_DISABLE, "", true));
RapidMiner.registerParameter(new ParameterTypeBoolean(PROPERTY_SHOW_NO_RESULT_WARNING, "", true));
RapidMiner.registerParameter(new ParameterTypeCategory(RapidMinerGUI.PROPERTY_TRANSFER_USAGESTATS, "",
RapidMinerGUI.PROPERTY_TRANSFER_USAGESTATS_ANSWERS, UsageStatsTransmissionDialog.ASK));
RapidMinerGUI.PROPERTY_TRANSFER_USAGESTATS_ANSWERS, UsageStatsTransmissionDialog.ALWAYS));
RapidMiner.registerParameter(new ParameterTypeCategory(RapidMinerGUI.PROPERTY_DRAG_TARGET_HIGHLIGHTING, "",
PROPERTY_DRAG_TARGET_HIGHLIGHTING_VALUES, DRAG_TARGET_HIGHLIGHTING_FULL));

Expand Down Expand Up @@ -272,6 +272,7 @@ public void run() {
RapidMinerGUI.saveGUIProperties();
UsageStatistics.getInstance().save();
RepositoryManager.shutdown();
UsageStatsTransmissionDialog.transmitOnShutdown();
}
}

Expand Down
24 changes: 19 additions & 5 deletions src/main/java/com/rapidminer/gui/actions/Actions.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@ public void actionPerformed(ActionEvent e) {
}
};

private transient final Action SHOW_PROBLEM_ACTION = new ResourceAction(true, "show_potential_problem") {

private static final long serialVersionUID = -1260942717363137733L;

{
setCondition(OPERATOR_SELECTED, MANDATORY);
}

@Override
public void actionPerformed(ActionEvent e) {
mainFrame.getProcessPanel().getOperatorWarningHandler().showOperatorWarning(getFirstSelectedOperator());
}
};

private List<Operator> selection;

private Process process;
Expand Down Expand Up @@ -189,6 +203,9 @@ public void addToOperatorPopupMenu(JPopupMenu menu, Action renameAction, Action.
} else {
menu.add(RENAME_OPERATOR_ACTION);
}
if (!op.getErrorList().isEmpty()) {
menu.add(SHOW_PROBLEM_ACTION);
}
menu.addSeparator();
if (op instanceof OperatorChain && ((OperatorChain) op).getAllInnerOperators().size() > 0) {
menu.add(OperatorMenu.REPLACE_OPERATORCHAIN_MENU);
Expand Down Expand Up @@ -338,11 +355,8 @@ public void insert(List<Operator> newOperators) {
return;
} else if (mainFrame.getProcessPanel().getProcessRenderer().getModel().getDisplayedChain() == selectedNode) {
for (Operator newOperator : newOperators) {
int index = mainFrame
.getProcessPanel()
.getProcessRenderer()
.getProcessIndexUnder(
mainFrame.getProcessPanel().getProcessRenderer().getModel().getCurrentMousePosition());
int index = mainFrame.getProcessPanel().getProcessRenderer().getProcessIndexUnder(
mainFrame.getProcessPanel().getProcessRenderer().getModel().getCurrentMousePosition());
if (index == -1) {
index = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rapidminer/gui/dialog/EULADialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class EULADialog extends ButtonDialog implements AdjustmentListener, Chan
/**
* Should be adjusten whenever the EULA is updated.
*/
private static final String ACCEPT_PROPERTY = "rapidminer.eula.v3.accepted";
private static final String ACCEPT_PROPERTY = "rapidminer.eula.v4.accepted";

private final JButton acceptButton;
private final JCheckBox acceptCheckBox;
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/com/rapidminer/gui/flow/ProcessPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import com.rapidminer.gui.flow.processrendering.model.ProcessRendererModel;
import com.rapidminer.gui.flow.processrendering.view.ProcessRendererView;
import com.rapidminer.gui.flow.processrendering.view.RenderPhase;
import com.rapidminer.gui.flow.processrendering.view.components.OperatorWarningHandler;
import com.rapidminer.gui.look.Colors;
import com.rapidminer.gui.processeditor.ProcessEditor;
import com.rapidminer.gui.tools.ExtendedJScrollPane;
Expand Down Expand Up @@ -81,6 +82,9 @@ public class ProcessPanel extends JPanel implements Dockable, ProcessEditor {
/** the background image handler */
private final ProcessBackgroundImageVisualizer backgroundImageHandler;

/** the handler for operator warning bubbles */
private final OperatorWarningHandler operatorWarningHandler;

private final ProcessButtonBar processButtonBar;

private final JButton resetZoom;
Expand Down Expand Up @@ -207,6 +211,10 @@ public void actionPerformed(ActionEvent e) {
add(scrollPane, BorderLayout.CENTER);

new ProcessPanelScroller(renderer, scrollPane);

// add event decorator for operator warning icons
operatorWarningHandler = new OperatorWarningHandler(model);
renderer.addEventDecorator(operatorWarningHandler, RenderPhase.OPERATOR_ADDITIONS);
}

/**
Expand Down Expand Up @@ -308,4 +316,13 @@ public JViewport getViewPort() {
return scrollPane.getViewport();
}

/**
* Returns the handler for operator warning bubbles.
*
* @return the handler for operator warnings, never {@code null}
*/
public OperatorWarningHandler getOperatorWarningHandler() {
return operatorWarningHandler;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ public void mouseDragged(final MouseEvent e) {
// ports are draggeable only if they belong to the displayed chain <->
// they are innersinks of our sources
if (isDisplayChainPortDragged() &&
// furthermore they can only be dragged with left mouse button + shift key
// pressed
// furthermore they can only be dragged with left mouse button + shift key
// pressed
pressedMouseButton == MouseEvent.BUTTON1 && e.isShiftDown()) {

double diff = e.getY() - mousePositionAtLastEvaluation.getY();
Expand Down Expand Up @@ -771,6 +771,10 @@ private void connectConnectingPortSourceWithHoveringPort(final InputPort input,

// calculate popup position
Point popupPosition = ProcessDrawUtils.createPortLocation(hoveringPort, model);
// correct by zoomFactor
double zoomFactor = model.getZoomFactor();
popupPosition = new Point((int) (popupPosition.getX() * zoomFactor),
(int) (popupPosition.getY() * zoomFactor));

// take splitted process pane into account and add offset for each process we
// have to the left of our current one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ public void dragEnded() {
model.fireMiscChanged();
}
};

private final ResourceAction renameAction;
private final ResourceAction selectAllAction;
private final ResourceAction deleteSelectedAction;
Expand Down
Loading

0 comments on commit 073996d

Please sign in to comment.