Skip to content

Commit

Permalink
Merge pull request #573 from Teiid-Designer/11.0.x-upgrade
Browse files Browse the repository at this point in the history
11.0.x upgrade changes to master
  • Loading branch information
blafond committed Jun 14, 2017
2 parents b414af6 + 975695b commit bfd4154
Show file tree
Hide file tree
Showing 262 changed files with 21,758 additions and 712 deletions.
9 changes: 9 additions & 0 deletions features/org.teiid.designer.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@
<import plugin="org.eclipse.swt" version="3.104.1" match="compatible"/>
<import plugin="org.eclipse.jdt.core" version="3.11.1" match="compatible"/>
<import plugin="org.eclipse.wst.server.core" version="1.7.0" match="compatible"/>
<!--
<import plugin="org.teiid.designer.dataservices.ui" version="11.0.0" match="compatible"/>
-->
<import plugin="org.teiid.designer.datasources.ui" version="11.0.0" match="compatible"/>
</requires>

<plugin
Expand Down Expand Up @@ -632,5 +636,10 @@
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.teiid.designer.datasources.ui"
download-size="0"
install-size="0"
version="0.0.0"/>

</feature>
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ public PerspectiveObject[] getContributions() {
}

private void createContributions() {
contributions = new PerspectiveObject[2];
contributions = new PerspectiveObject[1];

PerspectiveObject connectorsView =
PerspectiveObject guidesView =
new PerspectiveObject(
AdvisorUiConstants.Extensions.GUIDES_VIEW_ID,
false,
PerspectiveObject.TOP_RIGHT);
PerspectiveObject.TOP_LEFT);

contributions[0] = connectorsView;
contributions[0] = guidesView;

PerspectiveObject statusView =
new PerspectiveObject(
AdvisorUiConstants.Extensions.STATUS_VIEW_ID,
false,
PerspectiveObject.BOTTOM_LEFT);
contributions[1] = statusView;
// PerspectiveObject statusView =
// new PerspectiveObject(
// AdvisorUiConstants.Extensions.STATUS_VIEW_ID,
// false,
// PerspectiveObject.BOTTOM_LEFT);
// contributions[1] = statusView;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ public static DatatypeManager getDatatypeManager( final EObject object,
}

if (defaultToWorkspaceMgr && result == null) {
result = ModelerCore.getWorkspaceDatatypeManager();
result = registry.register(DEFAULT_DATATYPE_MANAGER_KEY, ModelerCore.getWorkspaceDatatypeManager());
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ FindTypedObjectCommandImpl.Error_trying_to_execute_command=Error trying to execu
MtkXmiResourceImpl.0=The eObject of type {0} does not have a uuid, creating a new uuid for the eObject.
ModelAnnotationUuidRule.0=The eObject {0} does not have a uuid.
ModelAnnotationUuidRule.1=EObject {0} with uuid {1} already exists, check if the same model file {2} is copied at multiple locations.
ModelAnnotationUuidRule.2= Connection URL property {0} for source model {1} contains one or more spaces. Some operating systems may require replacement characters in URL.
EObjectUuidRule.0=The eObject {0} does not have a uuid.
EObjectUuidRule.1=EObject {0} with uuid {1} already exists, check if the same model file {2} is copied at multiple locations.
ResourceDescriptorImpl.Error_while_loading_resource_factory_extension=Error while loading resource factory extension {0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
*/
package org.teiid.designer.core.metamodel.aspect.core.aspects.validation.rules;

import java.util.Properties;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.ecore.EObject;
import org.teiid.core.designer.util.CoreArgCheck;
import org.teiid.core.designer.util.StringConstants;
import org.teiid.designer.core.ModelEditor;
import org.teiid.designer.core.ModelerCore;
import org.teiid.designer.core.validation.ObjectValidationRule;
Expand All @@ -18,6 +21,10 @@
import org.teiid.designer.core.validation.ValidationProblemImpl;
import org.teiid.designer.core.validation.ValidationResult;
import org.teiid.designer.core.validation.ValidationResultImpl;
import org.teiid.designer.core.workspace.ModelResource;
import org.teiid.designer.core.workspace.ModelUtil;
import org.teiid.designer.core.workspace.ModelWorkspaceException;
import org.teiid.designer.core.workspace.ResourceAnnotationHelper;
import org.teiid.designer.metamodels.core.ModelAnnotation;


Expand Down Expand Up @@ -60,6 +67,32 @@ public void validate(final EObject eObject, final ValidationContext context) {
context.addUuidToContext(uuidString);
}
}

// Add rule to check for "ENDPOINT" connection property?

ResourceAnnotationHelper helper = new ResourceAnnotationHelper();

try {
ModelResource mr = ModelUtil.getModel(eObject);
Properties modelProps = helper.getProperties(mr, "connection:");
for( Object key : modelProps.keySet() ) {
String keyStr = (String)key;
if( keyStr.equalsIgnoreCase("connection:URL") || keyStr.equalsIgnoreCase("connection:FlatFileHomeUrl") ) {
String value = (String)modelProps.get(key);
if( value.contains(StringConstants.SPACE) ) {
final ValidationResult result = new ValidationResultImpl(eObject);
String modelName = editor.getModelName(eObject);
// create validation problem and addit to the result
final ValidationProblem problem = new ValidationProblemImpl(0, IStatus.WARNING, ModelerCore.Util.getString("ModelAnnotationUuidRule.2", value, modelName)); //$NON-NLS-1$
result.addProblem(problem);
context.addResult(result);
}
}
}
} catch (ModelWorkspaceException e) {
e.printStackTrace();
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected void canCreateResource( final URI uri ) {
final ObjectID uuid = IDGenerator.getInstance().stringToObject(uuidString);

Resource myExistingResource = this.container.getResourceFinder().findByUUID(uuid, false);
if (myExistingResource != null) {
if (myExistingResource != null && !myExistingResource.getURI().toString().contains(".metadata")) {
final URI existingResourceUri = myExistingResource.getURI();
final Object[] params = new Object[] {URI.decode(uri.toString()),
URI.decode(existingResourceUri.toString())};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ public ModelResourceImpl( final ModelWorkspaceItem parent,
resourceSet.createResource(uri);
}
} catch (DuplicateResourceException dre) {
ModelerCore.Util.log(dre);
String message = dre.getMessage();
// Perform a check to see if this is a duplicate resource under the .metadata vdb plugin
// this can be ignored as part of the VDB XML export which can happen if models
// are not synchronized
if( !message.contains(".metadata/.plugins/org.teiid.designer.vdb/") &&
!message.contains("Unable to load the model at file:") ) {
ModelerCore.Util.log(dre);
}
} catch (ModelWorkspaceException mwe) {
ModelerCore.Util.log(mwe);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,9 @@ public void addNotificationListener( ModelWorkspaceNotificationListener listener
@Override
public void removeNotificationListener( ModelWorkspaceNotificationListener listener ) {
CoreArgCheck.isNotNull(listener);
ModelWorkspaceManager.getModelWorkspaceManager().removeNotificationListener(listener);
if (!ModelWorkspaceManager.isShutDown() ) {
ModelWorkspaceManager.getModelWorkspaceManager().removeNotificationListener(listener);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public class ModelWorkspaceManager implements XmiHeaderCache {
public static boolean VERBOSE = false;

public static boolean ZIP_ACCESS_VERBOSE = false;

public static boolean isShutDown = true;

/**
* The singleton manager
Expand Down Expand Up @@ -175,9 +177,15 @@ public final static ModelWorkspaceManager getModelWorkspaceManager() {
ModelerCore.Util.log(IStatus.ERROR,
ModelerCore.Util.getString("ModelWorkspaceManager.Error_encountered_starting_ModelWorkspaceManager_1")); //$NON-NLS-1$
}

isShutDown = false;
}
return manager;
}

public final static boolean isShutDown() {
return isShutDown;
}

public final static void shutdown() throws CoreException {
if (manager != null) try {
Expand All @@ -198,6 +206,7 @@ public final static void shutdown() throws CoreException {
1,
ModelerCore.Util.getString("ModelWorkspaceManager.Error_encountered_shutting_down_ModelWorkspaceManager_2"), t)); //$NON-NLS-1$
} finally {
isShutDown = true;
manager = null;
}
}
Expand Down
7 changes: 7 additions & 0 deletions plugins/org.teiid.designer.dataservices.ui/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="bin"/>
</classpath>
34 changes: 34 additions & 0 deletions plugins/org.teiid.designer.dataservices.ui/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.teiid.designer.dataservices.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
</projectDescription>
4 changes: 4 additions & 0 deletions plugins/org.teiid.designer.dataservices.ui/.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<form>
<p/><p><b>Tips on working with this plug-in project</b></p><li>For the view of the new plug-in at a glance, go to the <img href="pageImage"/><a href="OverviewPage">Overview</a>.</li><li>You can test the contributions of this plug-in by launching another instance of the workbench. On the <b>Run</b> menu, click <b>Run As</b> and choose <img href="runTimeWorkbenchImage"/><a href="action.run">Run-time Workbench</a> from the available choices.</li><li>You can add more functionality to this plug-in by adding extensions using the <a href="action.newExtension">New Extension Wizard</a>.</li><li>The plug-in project contains Java code that you can debug. Place breakpoints in Java classes. On the <b>Run</b> menu, select <b>Debug As</b> and choose <img href="runTimeWorkbenchImage"/><a href="action.debug">Run-time Workbench</a> from the available choices.</li>
</form>
6 changes: 6 additions & 0 deletions plugins/org.teiid.designer.dataservices.ui/LEGAL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Teiid Designer (http://www.jboss.org/projects/teiiddesigner.html) is copyright 2000-2012 MetaMatrix, Inc. and Red Hat, Inc.

This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which is
available at http://www.eclipse.org/legal/epl-v10.html.

Some portions may be licensed to Red Hat, Inc. under one or more contributor license agreements.
28 changes: 28 additions & 0 deletions plugins/org.teiid.designer.dataservices.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.teiid.designer.dataservices.ui;singleton:=true
Bundle-Version: 11.0.2.qualifier
Bundle-Activator: org.teiid.designer.dataservices.ui.UiPlugin
Bundle-Vendor: %pluginProvider
Bundle-Localization: plugin
Export-Package: org.teiid.designer.dataservices.ui,
org.teiid.designer.dataservices.ui.wizard
Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.11.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.10.1,4.0.0)",
org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
org.eclipse.gef;bundle-version="[3.10.1,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.11.1,4.0.0)",
org.teiid.designer.ui;bundle-version="[11.0.0,12.0.0)",
org.teiid.designer.core;bundle-version="[11.0.0,12.0.0)",
org.teiid.designer.ui.common;bundle-version="[11.0.0,12.0.0)",
org.teiid.core.designer;bundle-version="[11.0.0,12.0.0)",
org.eclipse.datatools.connectivity;bundle-version="[1.2.11,2.0.0)",
org.eclipse.datatools.connectivity.ui;bundle-version="[1.2.4,2.0.0)",
org.eclipse.ui.forms;bundle-version="[3.6.200,4.0.0)",
org.teiid.designer.datasources.ui;bundle-version="11.0.0",
org.eclipse.jface.databinding;bundle-version="1.8.0",
org.teiid.designer.spi;bundle-version="11.0.0",
org.teiid.designer.datatools.ui;bundle-version="11.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
14 changes: 14 additions & 0 deletions plugins/org.teiid.designer.dataservices.ui/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# JBoss, Home of Professional Open Source.
#
# See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing.
#
# See the AUTHORS.txt file distributed with this work for a full listing of individual contributors.
source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
plugin.properties,\
.,\
icons/,\
META-INF/,\
LEGAL.txt
src.includes =LEGAL.txt,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions plugins/org.teiid.designer.dataservices.ui/plugin.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# JBoss, Home of Professional Open Source.
#
# See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing.
#
# See the AUTHORS.txt file distributed with this work for a full listing of individual contributors.
pluginProvider = JBoss by Red Hat
pluginName=Designer Teiid Data Services Plug-in

OpenDSProjectAction.name = Open Data Services Project Editor
OpenDSProjectAction.label = Open Data Services Project Editor

NewDataServiceProjectWizard=Data Service Project
NewDataServiceProjectWizardDescription=Create a new data services project
49 changes: 49 additions & 0 deletions plugins/org.teiid.designer.dataservices.ui/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
JBoss, Home of Professional Open Source.
See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing.
See the AUTHORS.txt file distributed with this work for a full listing of individual contributors.
-->
<plugin>


<!-- Eclipse Import Wizards -->
<extension
point="org.eclipse.ui.editors">
<editor
class="org.teiid.designer.dataservices.ui.editor.DataServiceProjectEditor"
extensions=".xml"
icon="icons/profiles.gif"
id="org.teiid.designer.dataservices.ui.editor.DataServiceProjectEditorID"
name="Data Service Project Editor">
</editor>
</extension>
<extension
id="OpenDSProjectAction"
name="%OpenDSProjectAction.name"
point="org.teiid.designer.ui.modelProjectAction">
<projectAction
name="org.teiid.designer.dataservices.ui.editor.OpenDSProjectAction"
label="%OpenDSProjectAction.label">
</projectAction>
</extension>
<extension
point="org.eclipse.ui.newWizards">
<wizard
category="org.teiid.designer.ui"
class="org.teiid.designer.dataservices.ui.wizard.NewDataServiceProjectWizard"
finalPerspective="modelerPerspective"
icon="icons/teiid-server.png"
id="NewDataServiceProjectWizardID"
name="%NewDataServiceProjectWizard"
preferredPerspectives="modelerPerspective"
project="true">
<description>
%NewDataServiceProjectWizardDescription
</description>
</wizard>
</extension>
</plugin>
26 changes: 26 additions & 0 deletions plugins/org.teiid.designer.dataservices.ui/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools.teiid</groupId>
<artifactId>plugins</artifactId>
<version>0.0.4-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.teiid.designer.dataservices.ui</artifactId>
<version>11.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tychoVersion}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit bfd4154

Please sign in to comment.