You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2020/11/16 21:37:12 UTC
[incubator-hop] branch master updated: HOP-2182 : remove
dependencies: org.safehaus.jug (#383)
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new 95a4ea9 HOP-2182 : remove dependencies: org.safehaus.jug (#383)
95a4ea9 is described below
commit 95a4ea9c8a5a90bc08e32e19edfd831123f1113b
Author: Matt Casters <ma...@gmail.com>
AuthorDate: Mon Nov 16 22:37:03 2020 +0100
HOP-2182 : remove dependencies: org.safehaus.jug (#383)
* HOP-2182 : remove dependencies on conflicting licenses : JFreeChart
* HOP-2182 : remove dependencies on conflicting licenses : org.safehaus.jug:jug
---
core/pom.xml | 13 ---
.../java/org/apache/hop/core/util/UuidUtil.java | 103 --------------------
.../main/java/org/apache/hop/core/vfs/HopVfs.java | 4 +-
.../apache/hop/resource/UuidResourceNaming.java | 4 +-
.../transforms/randomvalue/RandomValue.java | 4 +-
.../org/apache/hop/ui/core/gui/GuiMenuWidgets.java | 6 +-
.../apache/hop/ui/core/gui/GuiToolbarWidgets.java | 15 ++-
.../main/java/org/apache/hop/ui/hopgui/HopGui.java | 105 ++++++++++-----------
.../hop/ui/hopgui/perspective/TabFileItem.java | 4 +-
9 files changed, 70 insertions(+), 188 deletions(-)
diff --git a/core/pom.xml b/core/pom.xml
index 2f4ca5b..12e93f1 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -33,7 +33,6 @@
<commons-dbcp.version>1.4</commons-dbcp.version>
<commons-pool.version>1.5.7</commons-pool.version>
<jetty-util.version>9.4.22.v20191022</jetty-util.version>
- <jug.version>2.0.0</jug.version>
<jsch.version>0.1.54</jsch.version>
<jzlib.version>1.0.7</jzlib.version>
<ognl.version>2.6.9</ognl.version>
@@ -377,18 +376,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.safehaus.jug</groupId>
- <artifactId>jug</artifactId>
- <classifier>asl</classifier>
- <version>${jug.version}</version>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>${jsch.version}</version>
diff --git a/core/src/main/java/org/apache/hop/core/util/UuidUtil.java b/core/src/main/java/org/apache/hop/core/util/UuidUtil.java
deleted file mode 100644
index fc76fff..0000000
--- a/core/src/main/java/org/apache/hop/core/util/UuidUtil.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*! ******************************************************************************
- *
- * Hop : The Hop Orchestration Platform
- *
- * Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
- * http://www.project-hop.org
- *
- *******************************************************************************
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- ******************************************************************************/
-
-package org.apache.hop.core.util;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hop.i18n.BaseMessages;
-import org.safehaus.uuid.UUID;
-import org.safehaus.uuid.UUIDGenerator;
-
-public class UuidUtil {
- private static final Class<?> PKG = UuidUtil.class; // Needed by Translator
-
- private static Log log = LogFactory.getLog( UuidUtil.class );
-
- static boolean nativeInitialized = false;
-
- static UUIDGenerator ug;
-
- static org.safehaus.uuid.EthernetAddress eAddr;
-
- static {
- // Try loading the EthernetAddress library. If this fails, then fallback
- // to
- // using another method for generating UUID's.
- /*
- * This is always going to fail at the moment try { System.loadLibrary("EthernetAddress"); nativeInitialized = true;
- * } catch (Throwable t) { // log.warn(BaseMessages.getString(PKG, "UuidUtil.ERROR_0001_LOADING_ETHERNET_ADDRESS")
- * ); // Ignore for now. }
- */
- ug = UUIDGenerator.getInstance();
- if ( nativeInitialized ) {
- try {
- com.ccg.net.ethernet.EthernetAddress ea = com.ccg.net.ethernet.EthernetAddress.getPrimaryAdapter();
- eAddr = new org.safehaus.uuid.EthernetAddress( ea.getBytes() );
- } catch ( Exception ex ) {
- log.error( BaseMessages.getString( PKG, "UUIDUtil.ERROR_0002_GET_MAC_ADDR" ), ex );
- } catch ( UnsatisfiedLinkError ule ) {
- log.error( BaseMessages.getString( PKG, "UUIDUtil.ERROR_0002_GET_MAC_ADDR" ), ule );
- nativeInitialized = false;
- }
- }
-
- /*
- * Add support for running in clustered environments. In this way, the MAC address of the running server can be
- * added to the environment with a -DMAC_ADDRESS=00:50:56:C0:00:01
- */
- if ( eAddr == null ) {
- String macAddr = System.getProperty( "MAC_ADDRESS" );
- if ( macAddr != null ) {
- // On Windows machines, people would be inclined to get the MAC
- // address with ipconfig /all. The format of this would be
- // something like 00-50-56-C0-00-08. So, replace '-' with ':' before
- // creating the address.
- //
- macAddr = macAddr.replace( '-', ':' );
- eAddr = new org.safehaus.uuid.EthernetAddress( macAddr );
- }
- }
-
- if ( eAddr == null ) {
- // Still don't have an Ethernet Address - generate a dummy one.
- eAddr = ug.getDummyAddress();
- }
-
- // Generate a UUID to make sure everything is running OK.
- UUID olduuId = ug.generateTimeBasedUUID( eAddr );
- if ( olduuId == null ) {
- log.error( BaseMessages.getString( PKG, "UUIDUtil.ERROR_0003_GENERATEFAILED" ) );
- }
-
- }
-
- public static String getUUIDAsString() {
- return getUUID().toString();
- }
-
- public static UUID getUUID() {
- return ug.generateTimeBasedUUID( eAddr );
- }
-
-}
diff --git a/core/src/main/java/org/apache/hop/core/vfs/HopVfs.java b/core/src/main/java/org/apache/hop/core/vfs/HopVfs.java
index 95a957f..b985395 100644
--- a/core/src/main/java/org/apache/hop/core/vfs/HopVfs.java
+++ b/core/src/main/java/org/apache/hop/core/vfs/HopVfs.java
@@ -39,7 +39,6 @@ import org.apache.hop.core.exception.HopException;
import org.apache.hop.core.exception.HopFileException;
import org.apache.hop.core.plugins.IPlugin;
import org.apache.hop.core.plugins.PluginRegistry;
-import org.apache.hop.core.util.UuidUtil;
import org.apache.hop.core.vfs.plugin.IVfs;
import org.apache.hop.core.vfs.plugin.VfsPluginType;
import org.apache.hop.i18n.BaseMessages;
@@ -53,6 +52,7 @@ import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.Comparator;
import java.util.List;
+import java.util.UUID;
import java.util.concurrent.locks.ReentrantReadWriteLock;
public class HopVfs {
@@ -410,7 +410,7 @@ public class HopVfs {
// when there multiple nodes with multiple JVMs on each node. In this case, the temp file names would end up being
// duplicated which would cause the sort to fail.
//
- String filename = baseUrl + "/" + prefix + "_" + UuidUtil.getUUIDAsString() + suffix;
+ String filename = baseUrl + "/" + prefix + "_" + UUID.randomUUID() + suffix;
fileObject = getFileObject( filename );
} while ( fileObject.exists() );
diff --git a/engine/src/main/java/org/apache/hop/resource/UuidResourceNaming.java b/engine/src/main/java/org/apache/hop/resource/UuidResourceNaming.java
index 3ba93ac..d70495d 100644
--- a/engine/src/main/java/org/apache/hop/resource/UuidResourceNaming.java
+++ b/engine/src/main/java/org/apache/hop/resource/UuidResourceNaming.java
@@ -22,7 +22,7 @@
package org.apache.hop.resource;
-import org.apache.hop.core.util.UuidUtil;
+import java.util.UUID;
public class UuidResourceNaming extends SimpleResourceNaming {
@@ -51,7 +51,7 @@ public class UuidResourceNaming extends SimpleResourceNaming {
// The UUID will look something like this:
// 03a32f25-1538-11dc-ae07-5dbf1395f3fd
//
- return UuidUtil.getUUIDAsString();
+ return UUID.randomUUID().toString();
}
}
diff --git a/plugins/transforms/randomvalue/src/main/java/org/apache/hop/pipeline/transforms/randomvalue/RandomValue.java b/plugins/transforms/randomvalue/src/main/java/org/apache/hop/pipeline/transforms/randomvalue/RandomValue.java
index e3331df..2bf3fec 100644
--- a/plugins/transforms/randomvalue/src/main/java/org/apache/hop/pipeline/transforms/randomvalue/RandomValue.java
+++ b/plugins/transforms/randomvalue/src/main/java/org/apache/hop/pipeline/transforms/randomvalue/RandomValue.java
@@ -26,7 +26,6 @@ import org.apache.hop.core.exception.HopException;
import org.apache.hop.core.row.IRowMeta;
import org.apache.hop.core.row.RowMeta;
import org.apache.hop.core.util.Uuid4Util;
-import org.apache.hop.core.util.UuidUtil;
import org.apache.hop.i18n.BaseMessages;
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
@@ -39,6 +38,7 @@ import javax.crypto.Mac;
import javax.crypto.SecretKey;
import java.security.NoSuchAlgorithmException;
import java.util.List;
+import java.util.UUID;
/**
* Get random value.
@@ -82,7 +82,7 @@ public class RandomValue extends BaseTransform<RandomValueMeta, RandomValueData>
row[index] = Long.toString(Math.abs(data.randomgen.nextLong()), 32);
break;
case RandomValueMeta.TYPE_RANDOM_UUID:
- row[index] = UuidUtil.getUUIDAsString();
+ row[index] = UUID.randomUUID().toString();
break;
case RandomValueMeta.TYPE_RANDOM_UUID4:
row[index] = data.u4.getUUID4AsString();
diff --git a/ui/src/main/java/org/apache/hop/ui/core/gui/GuiMenuWidgets.java b/ui/src/main/java/org/apache/hop/ui/core/gui/GuiMenuWidgets.java
index a27b4bb..be8c7e7 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/gui/GuiMenuWidgets.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/gui/GuiMenuWidgets.java
@@ -25,10 +25,9 @@ package org.apache.hop.ui.core.gui;
import org.apache.commons.lang.StringUtils;
import org.apache.hop.core.Const;
import org.apache.hop.core.exception.HopException;
-import org.apache.hop.core.gui.plugin.menu.GuiMenuItem;
import org.apache.hop.core.gui.plugin.GuiRegistry;
import org.apache.hop.core.gui.plugin.key.KeyboardShortcut;
-import org.apache.hop.core.util.UuidUtil;
+import org.apache.hop.core.gui.plugin.menu.GuiMenuItem;
import org.apache.hop.ui.core.ConstUi;
import org.apache.hop.ui.core.PropsUi;
import org.apache.hop.ui.hopgui.file.IHopFileType;
@@ -42,6 +41,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.UUID;
/**
* This class contains the widgets for Menu Bars
@@ -52,7 +52,7 @@ public class GuiMenuWidgets extends BaseGuiWidgets {
private Map<String, KeyboardShortcut> shortcutMap;
public GuiMenuWidgets() {
- super( UuidUtil.getUUIDAsString() );
+ super( UUID.randomUUID().toString() );
this.menuItemMap = new HashMap<>();
this.shortcutMap = new HashMap<>();
}
diff --git a/ui/src/main/java/org/apache/hop/ui/core/gui/GuiToolbarWidgets.java b/ui/src/main/java/org/apache/hop/ui/core/gui/GuiToolbarWidgets.java
index 7ac467f..fb98cac 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/gui/GuiToolbarWidgets.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/gui/GuiToolbarWidgets.java
@@ -22,17 +22,11 @@
package org.apache.hop.ui.core.gui;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
import org.apache.commons.lang.StringUtils;
import org.apache.hop.core.Const;
import org.apache.hop.core.gui.plugin.GuiRegistry;
import org.apache.hop.core.gui.plugin.toolbar.GuiToolbarElementType;
import org.apache.hop.core.gui.plugin.toolbar.GuiToolbarItem;
-import org.apache.hop.core.util.UuidUtil;
import org.apache.hop.ui.core.ConstUi;
import org.apache.hop.ui.core.PropsUi;
import org.apache.hop.ui.hopgui.HopGui;
@@ -45,11 +39,16 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
/**
* This class contains the widgets for the GUI elements of a GUI Plugin
*/
@@ -60,7 +59,7 @@ public class GuiToolbarWidgets extends BaseGuiWidgets {
private Map<String, ToolItem> toolItemMap;
public GuiToolbarWidgets() {
- super( UuidUtil.getUUIDAsString() );
+ super( UUID.randomUUID().toString() );
guiToolBarMap = new HashMap<>();
widgetsMap = new HashMap<>();
toolItemMap = new HashMap<>();
diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
index 2da9b72..e81fab7 100644
--- a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
+++ b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java
@@ -51,7 +51,6 @@ import org.apache.hop.core.plugins.PluginRegistry;
import org.apache.hop.core.search.ISearchableProvider;
import org.apache.hop.core.search.ISearchablesLocation;
import org.apache.hop.core.undo.ChangeAction;
-import org.apache.hop.core.util.UuidUtil;
import org.apache.hop.core.variables.IVariables;
import org.apache.hop.core.variables.Variables;
import org.apache.hop.i18n.BaseMessages;
@@ -107,7 +106,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;
@@ -127,6 +125,7 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
+import java.util.UUID;
@GuiPlugin(
description = "The main hop graphical user interface"
@@ -234,7 +233,7 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
private HopGui( Display display ) {
this.display = display;
- this.id = UuidUtil.getUUIDAsString();
+ this.id = UUID.randomUUID().toString();
commandLineArguments = new ArrayList<>();
variables = Variables.getADefaultVariableSpace();
@@ -323,9 +322,9 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
addMainToolbar();
addPerspectivesToolbar();
addMainPerspectivesComposite();
-
+
handleFileCapabilities( new EmptyFileType(), false, false );
-
+
loadPerspectives();
replaceKeyboardShortcutListeners( this );
@@ -382,11 +381,11 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
// Sort by ID
//
- Collections.sort( perspectivePlugins, Comparator.comparing( p -> p.getIds()[ 0 ] ) );
-
+ Collections.sort( perspectivePlugins, Comparator.comparing( p -> p.getIds()[ 0 ] ) );
+
for ( Plugin perspectivePlugin : perspectivePlugins ) {
Class<IHopPerspective> perspectiveClass = pluginRegistry.getClass( perspectivePlugin, IHopPerspective.class );
-
+
// Create a new instance & initialize.
//
IHopPerspective perspective = perspectiveClass.newInstance();
@@ -395,20 +394,20 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
// Create a toolbar item
//
- ToolItem item = new ToolItem(this.perspectivesToolbar,SWT.RADIO);
- item.setToolTipText(Const.NVL(perspectivePlugin.getName(),perspective.getId()));
- item.setData(perspective);
- item.addListener(SWT.Selection, (event) -> setActivePerspective((IHopPerspective) event.widget.getData()));
-
- ClassLoader classLoader = pluginRegistry.getClassLoader(perspectivePlugin);
- Image image = GuiResource.getInstance().getImage(perspectivePlugin.getImageFile(), classLoader, ConstUi.SMALL_ICON_SIZE, ConstUi.SMALL_ICON_SIZE);
- if (image!=null) {
- item.setImage(image);
- }
-
+ ToolItem item = new ToolItem( this.perspectivesToolbar, SWT.RADIO );
+ item.setToolTipText( Const.NVL( perspectivePlugin.getName(), perspective.getId() ) );
+ item.setData( perspective );
+ item.addListener( SWT.Selection, ( event ) -> setActivePerspective( (IHopPerspective) event.widget.getData() ) );
+
+ ClassLoader classLoader = pluginRegistry.getClassLoader( perspectivePlugin );
+ Image image = GuiResource.getInstance().getImage( perspectivePlugin.getImageFile(), classLoader, ConstUi.SMALL_ICON_SIZE, ConstUi.SMALL_ICON_SIZE );
+ if ( image != null ) {
+ item.setImage( image );
+ }
+
if ( first ) {
first = false;
- item.setSelection(true);
+ item.setSelection( true );
}
}
} catch ( Exception e ) {
@@ -591,12 +590,12 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
}
@GuiMenuElement( root = ID_MAIN_MENU, id = ID_MAIN_MENU_EDIT_FIND, label = "Find...", parentId = ID_MAIN_MENU_EDIT_PARENT_ID )
- @GuiKeyboardShortcut( key = 'f', control = true)
- @GuiOsxKeyboardShortcut( key = 'f', command = true)
+ @GuiKeyboardShortcut( key = 'f', control = true )
+ @GuiOsxKeyboardShortcut( key = 'f', command = true )
public void menuEditFind() {
IHopPerspective perspective = perspectiveManager.findPerspective( HopSearchPerspective.class );
- if (perspective!=null) {
- ((HopSearchPerspective)perspective).activate();
+ if ( perspective != null ) {
+ ( (HopSearchPerspective) perspective ).activate();
}
}
@@ -769,7 +768,7 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
//
MenuItem undoItem = mainMenuWidgets.findMenuItem( ID_MAIN_MENU_EDIT_UNDO );
MenuItem redoItem = mainMenuWidgets.findMenuItem( ID_MAIN_MENU_EDIT_REDO );
- if ( undoItem == null || redoItem == null || undoItem.isDisposed() || redoItem.isDisposed() ) {
+ if ( undoItem == null || redoItem == null || undoItem.isDisposed() || redoItem.isDisposed() ) {
return;
}
@@ -835,9 +834,9 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
mainMenuWidgets.enableMenuItem( fileType, ID_MAIN_MENU_EDIT_NAV_PREV, IHopFileType.CAPABILITY_FILE_HISTORY, getActivePerspective().hasNavigationPreviousFile() );
mainMenuWidgets.enableMenuItem( fileType, ID_MAIN_MENU_EDIT_NAV_NEXT, IHopFileType.CAPABILITY_FILE_HISTORY, getActivePerspective().hasNavigationNextFile() );
-
- mainToolbarWidgets.enableToolbarItem(fileType, ID_MAIN_TOOLBAR_SAVE, IHopFileType.CAPABILITY_SAVE );
- mainToolbarWidgets.enableToolbarItem(fileType, ID_MAIN_TOOLBAR_SAVE_AS, IHopFileType.CAPABILITY_SAVE );
+
+ mainToolbarWidgets.enableToolbarItem( fileType, ID_MAIN_TOOLBAR_SAVE, IHopFileType.CAPABILITY_SAVE );
+ mainToolbarWidgets.enableToolbarItem( fileType, ID_MAIN_TOOLBAR_SAVE_AS, IHopFileType.CAPABILITY_SAVE );
}
public IHopFileTypeHandler getActiveFileTypeHandler() {
@@ -1060,43 +1059,43 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
* @param perspective The perspective to active
*/
public void setActivePerspective( IHopPerspective perspective ) {
-
- if ( perspective == null ) {
- perspective = getDataOrchestrationPerspective();
+
+ if ( perspective == null ) {
+ perspective = getDataOrchestrationPerspective();
}
-
+
activePerspective = perspective;
-
+
// Move perspective control on top
//
StackLayout layout = (StackLayout) mainPerspectivesComposite.getLayout();
layout.topControl = perspective.getControl();
mainPerspectivesComposite.layout();
-
+
// Select toolbar item
//
- if ( perspectivesToolbar!=null && !perspectivesToolbar.isDisposed() ) {
- for ( ToolItem item: perspectivesToolbar.getItems() ) {
- item.setSelection( perspective.equals( item.getData() ) );
- }
+ if ( perspectivesToolbar != null && !perspectivesToolbar.isDisposed() ) {
+ for ( ToolItem item : perspectivesToolbar.getItems() ) {
+ item.setSelection( perspective.equals( item.getData() ) );
+ }
}
// Notify the perspective that it has been activated.
//
- perspective.perspectiveActivated();
-
- perspectiveManager.notifyPerspectiveActiviated(perspective);
+ perspective.perspectiveActivated();
+
+ perspectiveManager.notifyPerspectiveActiviated( perspective );
}
-
+
public boolean isActivePerspective( IHopPerspective perspective ) {
- if ( perspective!=null ) {
- for ( ToolItem item: perspectivesToolbar.getItems() ) {
- if (perspective.equals( item.getData() ) ) {
- return item.getSelection();
- }
- }
- }
- return false;
+ if ( perspective != null ) {
+ for ( ToolItem item : perspectivesToolbar.getItems() ) {
+ if ( perspective.equals( item.getData() ) ) {
+ return item.getSelection();
+ }
+ }
+ }
+ return false;
}
/**
@@ -1178,7 +1177,7 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
@Override public List<ISearchablesLocation> getSearchablesLocations() {
List<ISearchablesLocation> locations = new ArrayList<>();
- locations.add( new HopGuiSearchLocation(this) );
+ locations.add( new HopGuiSearchLocation( this ) );
// Allow plugins to add other locations as well
//
@@ -1191,10 +1190,10 @@ public class HopGui implements IActionContextHandlersProvider, ISearchableProvid
}
public static boolean editConfigFile( Shell shell, String configFilename, DescribedVariablesConfigFile variablesConfigFile, String selectedVariable ) throws HopException {
- String message = "Editing configuration file: "+configFilename;
+ String message = "Editing configuration file: " + configFilename;
HopDescribedVariablesDialog variablesDialog = new HopDescribedVariablesDialog( shell, message, variablesConfigFile.getDescribedVariables(), selectedVariable );
List<DescribedVariable> vars = variablesDialog.open();
- if (vars!=null) {
+ if ( vars != null ) {
variablesConfigFile.setDescribedVariables( vars );
variablesConfigFile.saveToFile();
return true;
diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/TabFileItem.java b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/TabFileItem.java
index f6db099..3dcc737 100644
--- a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/TabFileItem.java
+++ b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/TabFileItem.java
@@ -22,10 +22,10 @@
package org.apache.hop.ui.hopgui.perspective;
-import org.apache.hop.core.util.UuidUtil;
import org.eclipse.swt.custom.CTabItem;
import java.util.Objects;
+import java.util.UUID;
public class TabFileItem {
private String uuid;
@@ -33,7 +33,7 @@ public class TabFileItem {
private CTabItem tabItem;
public TabFileItem() {
- uuid = UuidUtil.getUUIDAsString();
+ uuid = UUID.randomUUID().toString();
}
public TabFileItem( String filename, CTabItem tabItem ) {