Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the OSGi-Framework-Connect on to p of Plexus
OSGi provides a new specification that allows powerful integration of "outside" bundles into a framework. Tycho can leverage this to have a seamless integration with the P2 code that requires OSGi to run but still interact with the OSGi parts without additional integration/conversion patterns.
- Loading branch information
Showing
14 changed files
with
998 additions
and
396 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
65 changes: 0 additions & 65 deletions
65
p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/DefaultProvisioningAgent.java
This file was deleted.
Oops, something went wrong.
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
75 changes: 75 additions & 0 deletions
75
p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/LoggerProgressMonitor.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,75 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 Christoph Läubrich 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: | ||
* Christoph Läubrich - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.tycho.p2maven; | ||
|
||
import java.util.concurrent.atomic.AtomicBoolean; | ||
|
||
import org.codehaus.plexus.logging.Logger; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
|
||
public class LoggerProgressMonitor implements IProgressMonitor { | ||
|
||
private final Logger log; | ||
|
||
private AtomicBoolean canceled = new AtomicBoolean(); | ||
|
||
public LoggerProgressMonitor(Logger log) { | ||
this.log = log; | ||
} | ||
|
||
@Override | ||
public void worked(int work) { | ||
|
||
} | ||
|
||
@Override | ||
public void subTask(String name) { | ||
if (name != null && !name.isBlank()) { | ||
log.debug(name); | ||
} | ||
} | ||
|
||
@Override | ||
public void setTaskName(String name) { | ||
if (name != null && !name.isBlank()) { | ||
log.info(name); | ||
} | ||
} | ||
|
||
@Override | ||
public void setCanceled(boolean value) { | ||
canceled.set(value); | ||
} | ||
|
||
@Override | ||
public boolean isCanceled() { | ||
return canceled.get(); | ||
} | ||
|
||
@Override | ||
public void internalWorked(double work) { | ||
|
||
} | ||
|
||
@Override | ||
public void done() { | ||
|
||
} | ||
|
||
@Override | ||
public void beginTask(String name, int totalWork) { | ||
if (name != null && !name.isBlank()) { | ||
log.info(name); | ||
} | ||
} | ||
} |
Oops, something went wrong.