forked from apache/hop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
566 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You 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. | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.apache.hop</groupId> | ||
<artifactId>hop-assemblies-plugins-tech</artifactId> | ||
<version>2.8.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>hop-assemblies-plugins-tech-hopserver</artifactId> | ||
<version>2.8.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
<name>Hop Assemblies Plugins Hop Server</name> | ||
<description /> | ||
|
||
<properties> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.apache.hop</groupId> | ||
<artifactId>hop-plugins-tech-hopserver</artifactId> | ||
<version>2.8.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
57 changes: 57 additions & 0 deletions
57
assemblies/plugins/tech/hopserver/src/assembly/assembly.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You 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. | ||
--> | ||
|
||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> | ||
<id>hop-assemblies-plugins-tech-hopserver</id> | ||
<formats> | ||
<format>zip</format> | ||
</formats> | ||
<baseDirectory>tech/hopserver</baseDirectory> | ||
<files> | ||
<file> | ||
<source>${project.basedir}/src/main/resources/version.xml</source> | ||
<outputDirectory>.</outputDirectory> | ||
<filtered>true</filtered> | ||
</file> | ||
</files> | ||
|
||
<fileSets> | ||
<fileSet> | ||
<outputDirectory>lib</outputDirectory> | ||
<excludes> | ||
<exclude>**/*</exclude> | ||
</excludes> | ||
</fileSet> | ||
</fileSets> | ||
<dependencySets> | ||
<dependencySet> | ||
<useProjectArtifact>false</useProjectArtifact> | ||
<includes> | ||
<include>org.apache.hop:hop-plugins-tech-hopserver:jar</include> | ||
</includes> | ||
</dependencySet> | ||
<dependencySet> | ||
<outputDirectory>lib</outputDirectory> | ||
<useProjectArtifact>false</useProjectArtifact> | ||
<scope>runtime</scope> | ||
<includes> | ||
</includes> | ||
</dependencySet> | ||
</dependencySets> | ||
</assembly> |
19 changes: 19 additions & 0 deletions
19
assemblies/plugins/tech/hopserver/src/main/resources/version.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You 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. | ||
--> | ||
|
||
<version>${project.version}</version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You 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. | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.apache.hop</groupId> | ||
<artifactId>hop-plugins-tech-hopserver</artifactId> | ||
<version>2.8.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>Hop Plugins Technology Google</name> | ||
<url>http://maven.apache.org</url> | ||
|
||
<parent> | ||
<groupId>org.apache.hop</groupId> | ||
<artifactId>hop-plugins-tech</artifactId> | ||
<version>2.8.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<licenses> | ||
<license> | ||
<name>Apache License, version 2.0</name> | ||
<url>https://www.apache.org/licenses/LICENSE-2.0</url> | ||
<distribution>repo</distribution> | ||
<comments /> | ||
</license> | ||
</licenses> | ||
|
||
<properties> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.hop</groupId> | ||
<artifactId>hop-core</artifactId> | ||
<scope>compile</scope> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hop</groupId> | ||
<artifactId>hop-ui</artifactId> | ||
<version>${project.version}</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
159 changes: 159 additions & 0 deletions
159
...opserver/src/main/java/org/apache/hop/hopserver/perspective/HopServerPerspective.java.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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.hopserver.perspective; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import org.apache.hop.core.gui.plugin.GuiPlugin; | ||
import org.apache.hop.core.search.ISearchable; | ||
import org.apache.hop.ui.core.ConstUi; | ||
import org.apache.hop.ui.core.PropsUi; | ||
import org.apache.hop.ui.hopgui.HopGui; | ||
import org.apache.hop.ui.hopgui.context.IGuiContextHandler; | ||
import org.apache.hop.ui.hopgui.file.IHopFileType; | ||
import org.apache.hop.ui.hopgui.file.IHopFileTypeHandler; | ||
import org.apache.hop.ui.hopgui.perspective.HopPerspectivePlugin; | ||
import org.apache.hop.ui.hopgui.perspective.IHopPerspective; | ||
import org.apache.hop.ui.hopgui.perspective.TabItemHandler; | ||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.FormLayout; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Control; | ||
|
||
@HopPerspectivePlugin( | ||
id = "HopNeo4jPerspective2", | ||
name = "Neo4j", | ||
description = "Neo4j Perspective", | ||
image = "server.svg") | ||
@GuiPlugin | ||
public class HopServerPerspective implements IHopPerspective { | ||
|
||
public HopServerPerspective() {} | ||
|
||
public static final Class<?> PKG = HopServerPerspective.class; | ||
|
||
public static final String ID_PERSPECTIVE_TOOLBAR_ITEM = "9900-perspective-hopserver"; | ||
|
||
private HopGui hopGui; | ||
private Composite parent; | ||
private Composite composite; | ||
|
||
@Override | ||
public List<IGuiContextHandler> getContextHandlers() { | ||
List<IGuiContextHandler> handlers = new ArrayList<>(); | ||
return handlers; | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return "hansIsCool"; | ||
} | ||
|
||
@Override | ||
public IHopFileTypeHandler getActiveFileTypeHandler() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void setActiveFileTypeHandler(IHopFileTypeHandler activeFileTypeHandler) { | ||
|
||
} | ||
|
||
@Override | ||
public List<IHopFileType> getSupportedHopFileTypes() { | ||
return Collections.emptyList(); | ||
} | ||
|
||
@Override | ||
public void activate() { | ||
hopGui.setActivePerspective(this); | ||
|
||
} | ||
|
||
@Override | ||
public void perspectiveActivated() { | ||
|
||
} | ||
|
||
@Override | ||
public void navigateToPreviousFile() { | ||
|
||
} | ||
|
||
@Override | ||
public void navigateToNextFile() { | ||
|
||
} | ||
|
||
@Override | ||
public boolean isActive() { | ||
return hopGui.isActivePerspective(this); | ||
} | ||
|
||
@Override | ||
public void initialize(HopGui hopGui, Composite parent) { | ||
this.hopGui = hopGui; | ||
this.parent = parent; | ||
|
||
PropsUi props = PropsUi.getInstance(); | ||
|
||
int size = (int) Math.round((double) ConstUi.SMALL_ICON_SIZE * props.getZoomFactor()); | ||
|
||
composite = new Composite(parent, SWT.NONE); | ||
PropsUi.setLook(composite); | ||
FormLayout layout = new FormLayout(); | ||
layout.marginLeft = props.getMargin(); | ||
layout.marginTop = props.getMargin(); | ||
layout.marginLeft = props.getMargin(); | ||
layout.marginBottom = props.getMargin(); | ||
composite.setLayout(layout); | ||
|
||
} | ||
|
||
@Override | ||
public boolean hasNavigationPreviousFile() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean hasNavigationNextFile() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public Control getControl() { | ||
return composite; | ||
} | ||
|
||
@Override | ||
public boolean remove(IHopFileTypeHandler typeHandler) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public List<TabItemHandler> getItems() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public List<ISearchable> getSearchables() { | ||
List<ISearchable> searchables = new ArrayList<>(); | ||
return searchables; | ||
} | ||
} |
Oops, something went wrong.