-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize usage of Eclipse Applications in Tycho
Embedded Eclipse Application have proven to be a powerful tool in Tycho to reuse existing Eclipse codes in a dynamic way. Currently its still a bit of boilerplate code to start the application but always have the same semantics we want something with bundles resolved and cached and read from a location/target. This adds a generic EclipseApplicationManager that is able to manage many applications and caching these in a more effective way than single applications can do.
- Loading branch information
Showing
13 changed files
with
349 additions
and
210 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
83 changes: 83 additions & 0 deletions
83
tycho-compiler-plugin/src/main/java/org/eclipse/tycho/compiler/BundleListTargetLocation.java
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,83 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2019 Red Hat Inc. and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* - Mickael Istria (Red Hat Inc.) | ||
*******************************************************************************/ | ||
package org.eclipse.tycho.compiler; | ||
|
||
import org.eclipse.core.runtime.CoreException; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
import org.eclipse.core.runtime.IStatus; | ||
import org.eclipse.core.runtime.Status; | ||
import org.eclipse.pde.core.target.ITargetDefinition; | ||
import org.eclipse.pde.core.target.ITargetLocation; | ||
import org.eclipse.pde.core.target.TargetBundle; | ||
import org.eclipse.pde.core.target.TargetFeature; | ||
|
||
class BundleListTargetLocation implements ITargetLocation { | ||
|
||
private TargetBundle[] bundles; | ||
|
||
public BundleListTargetLocation(TargetBundle[] bundles) { | ||
this.bundles = bundles; | ||
} | ||
|
||
@Override | ||
public <T> T getAdapter(Class<T> adapter) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public IStatus resolve(ITargetDefinition definition, IProgressMonitor monitor) { | ||
return Status.OK_STATUS; | ||
} | ||
|
||
@Override | ||
public boolean isResolved() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public IStatus getStatus() { | ||
return Status.OK_STATUS; | ||
} | ||
|
||
@Override | ||
public String getType() { | ||
return "BundleList"; //$NON-NLS-1$ | ||
} | ||
|
||
@Override | ||
public String getLocation(boolean resolve) throws CoreException { | ||
return null; | ||
} | ||
|
||
@Override | ||
public TargetBundle[] getBundles() { | ||
return this.bundles; | ||
} | ||
|
||
@Override | ||
public TargetFeature[] getFeatures() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String[] getVMArguments() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String serialize() { | ||
return null; | ||
} | ||
|
||
} |
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
Oops, something went wrong.