-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from jGauravGupta/FISH-7932
FISH-7932 Release Payara Community Tools v1.8.0 with Cloud integration
- Loading branch information
Showing
32 changed files
with
2,359 additions
and
188 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# Payara Micro Community Tools for IntelliJ IDEA Community Edition | ||
# Payara IntelliJ Community Tools for IntelliJ IDEA Community Edition | ||
|
||
[![License](https://img.shields.io/badge/License-EPL%202.0-red.svg)](http://www.eclipse.org/legal/epl-2.0) | ||
|
||
### Ecosystem Plugin Support | ||
Support for the Payara Micro Community Tools plugin is handled in the [Ecosystem Support Repository](https://github.com/payara/ecosystem-support) | ||
Support for the Payara IntelliJ Community Tools plugin is handled in the [Ecosystem Support Repository](https://github.com/payara/ecosystem-support) | ||
|
||
### IntelliJ IDEA Payara Plugin Documentation | ||
Full documentation for the configuration and usage of the Payara Micro Community Tools plugin can be found in the [technical documentation](https://docs.payara.fish/community/docs/Technical%20Documentation/Ecosystem/IDE%20Integration/IntelliJ%20Plugin/Overview.html) | ||
Full documentation for the configuration and usage of the Payara IntelliJ Community Tools plugin can be found in the [technical documentation](https://docs.payara.fish/community/docs/Technical%20Documentation/Ecosystem/IDE%20Integration/IntelliJ%20Plugin/Overview.html) |
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
57 changes: 57 additions & 0 deletions
57
src/main/java/fish/payara/cloud/PayaraCloudConfigurationType.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,57 @@ | ||
/* | ||
* Copyright (c) 2020-2024 Payara Foundation and/or its affiliates and others. | ||
* All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0, which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the | ||
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | ||
* version 2 with the GNU Classpath Exception, which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
*/ | ||
package fish.payara.cloud; | ||
|
||
import fish.payara.cloud.maven.CloudMavenConfigurationFactory; | ||
import com.intellij.execution.configurations.ConfigurationFactory; | ||
import com.intellij.execution.configurations.ConfigurationType; | ||
import static fish.payara.PayaraConstants.CLOUD_ICON; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import javax.swing.*; | ||
|
||
public class PayaraCloudConfigurationType implements ConfigurationType { | ||
|
||
@NotNull | ||
@Override | ||
public String getDisplayName() { | ||
return "Payara Cloud"; | ||
} | ||
|
||
@Override | ||
public String getConfigurationTypeDescription() { | ||
return "Payara Cloud configuration type"; | ||
} | ||
|
||
@Override | ||
public Icon getIcon() { | ||
return CLOUD_ICON; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public String getId() { | ||
return "PAYARA_CLOUD_CONFIGURATION"; | ||
} | ||
|
||
@Override | ||
public ConfigurationFactory[] getConfigurationFactories() { | ||
return new ConfigurationFactory[]{ | ||
new CloudMavenConfigurationFactory(this) | ||
}; | ||
} | ||
} |
188 changes: 188 additions & 0 deletions
188
src/main/java/fish/payara/cloud/PayaraCloudProject.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,188 @@ | ||
/* | ||
* Copyright (c) 2020-2022 Payara Foundation and/or its affiliates and others. | ||
* All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0, which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the | ||
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | ||
* version 2 with the GNU Classpath Exception, which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
*/ | ||
package fish.payara.cloud; | ||
|
||
import com.intellij.openapi.extensions.ExtensionsArea; | ||
import com.intellij.openapi.extensions.PluginDescriptor; | ||
import com.intellij.openapi.extensions.PluginId; | ||
import com.intellij.openapi.project.Project; | ||
import com.intellij.openapi.util.Condition; | ||
import com.intellij.openapi.util.Key; | ||
import com.intellij.openapi.vfs.VirtualFile; | ||
import com.intellij.psi.PsiFile; | ||
import com.intellij.util.ReflectionUtil; | ||
import com.intellij.util.messages.MessageBus; | ||
import org.jetbrains.annotations.NotNull; | ||
import kotlinx.coroutines.CoroutineScope; | ||
import kotlinx.coroutines.GlobalScope; | ||
/** | ||
* | ||
* @author [email protected] | ||
*/ | ||
public abstract class PayaraCloudProject implements Project { | ||
|
||
private final Project project; | ||
|
||
private final PsiFile buildFile; | ||
|
||
protected PayaraCloudProject(Project project, PsiFile buildFile) { | ||
this.project = project; | ||
this.buildFile = buildFile; | ||
} | ||
|
||
public <T> T instantiateClass(@NotNull Class<T> aClass, @NotNull PluginId pluginId) { | ||
return ReflectionUtil.newInstance(aClass, false); | ||
} | ||
|
||
public Project getProject() { | ||
return project; | ||
} | ||
|
||
public PsiFile getBuildFile() { | ||
return buildFile; | ||
} | ||
|
||
public abstract String getProjectName(); | ||
|
||
public abstract String getLoginCommand(); | ||
|
||
public abstract String getDevCommand(); | ||
|
||
public abstract String getDeployCommand(); | ||
|
||
public abstract String getUndeployCommand(); | ||
|
||
public abstract String getStartCommand(); | ||
|
||
public abstract String getStopCommand(); | ||
|
||
public abstract String getApplicationCommand(); | ||
|
||
public abstract String getNamespaceCommand(); | ||
|
||
public abstract String getSubscriptionCommand(); | ||
|
||
@Override | ||
public String getName() { | ||
return project.getName(); | ||
} | ||
|
||
@Override | ||
public VirtualFile getBaseDir() { | ||
return project.getBaseDir(); | ||
} | ||
|
||
@Override | ||
public String getBasePath() { | ||
return project.getBasePath(); | ||
} | ||
|
||
@Override | ||
public VirtualFile getProjectFile() { | ||
return project.getProjectFile(); | ||
} | ||
|
||
@Override | ||
public String getProjectFilePath() { | ||
return project.getProjectFilePath(); | ||
} | ||
|
||
@Override | ||
public VirtualFile getWorkspaceFile() { | ||
return project.getWorkspaceFile(); | ||
} | ||
|
||
@Override | ||
public String getLocationHash() { | ||
return project.getLocationHash(); | ||
} | ||
|
||
@Override | ||
public void save() { | ||
project.save(); | ||
} | ||
|
||
@Override | ||
public boolean isOpen() { | ||
return project.isOpen(); | ||
} | ||
|
||
@Override | ||
public boolean isInitialized() { | ||
return project.isInitialized(); | ||
} | ||
|
||
@Override | ||
public boolean isDefault() { | ||
return project.isDefault(); | ||
} | ||
|
||
@Override | ||
public <T> T getComponent(Class<T> type) { | ||
return project.getComponent(type); | ||
} | ||
|
||
@Override | ||
public MessageBus getMessageBus() { | ||
return project.getMessageBus(); | ||
} | ||
|
||
@Override | ||
public boolean isDisposed() { | ||
return project.isDisposed(); | ||
} | ||
|
||
@Override | ||
public Condition<?> getDisposed() { | ||
return project.getDisposed(); | ||
} | ||
|
||
@Override | ||
public <T> T getUserData(Key<T> key) { | ||
return project.getUserData(key); | ||
} | ||
|
||
@Override | ||
public <T> void putUserData(Key<T> key, T t) { | ||
project.putUserData(key, t); | ||
} | ||
|
||
@Override | ||
public void dispose() { | ||
project.dispose(); | ||
} | ||
|
||
public CoroutineScope getCoroutineScope() { | ||
return GlobalScope.INSTANCE; | ||
} | ||
|
||
@Override | ||
public <@NotNull T> T instantiateClass(@NotNull String baseClass, PluginDescriptor pluginDescriptor) { | ||
return getProject().instantiateClass(baseClass, pluginDescriptor); | ||
} | ||
|
||
@Override | ||
public ExtensionsArea getExtensionArea() { | ||
return getProject().getExtensionArea(); | ||
} | ||
|
||
@Override | ||
public boolean hasComponent(@NotNull Class<?> interfaceClass) { | ||
return getProject().hasComponent(interfaceClass); | ||
} | ||
|
||
} |
Oops, something went wrong.