Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ out/
/.idea
/.gradle
/build
.intellijPlatform
12 changes: 8 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

fun properties(key: String) = project.findProperty(key).toString()

plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "2.0.0"
id("org.jetbrains.intellij.platform") version "2.4.0"
id("org.jetbrains.kotlin.jvm") version "2.2.0"
id("org.jetbrains.intellij.platform") version "2.10.5"
id("org.jetbrains.changelog") version "1.3.1"
id("org.jetbrains.qodana") version "0.1.13"
}
Expand All @@ -27,7 +28,9 @@ dependencies {
intellijPlatform {
val version = providers.gradleProperty("platformVersion")
val type = providers.gradleProperty("platformType")
create(type, version, useInstaller = false)
create(type, version) {
useInstaller = false
}

bundledPlugins(properties("platformBundledPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
plugins(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
Expand All @@ -39,6 +42,7 @@ dependencies {
testImplementation("junit:junit:4.13.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.8.2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.8.2")
}

// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
Expand Down Expand Up @@ -72,7 +76,7 @@ tasks {
targetCompatibility = it
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = it
compilerOptions.jvmTarget.set(JvmTarget.fromTarget(it))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @author Daniel Espendiller <daniel@espendiller.net>
*/
@Service
@State(name = "PHP Toolbox", storages = @Storage(file = "$APP_CONFIG$/php-toolbox.xml"))
@State(name = "PHP Toolbox", storages = @Storage("$APP_CONFIG$/php-toolbox.xml"))
public class PhpToolboxApplicationService implements PersistentStateComponent<PhpToolboxApplicationService> {

final public static Logger LOG = Logger.getInstance("Toolbox-Plugin");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
*/
public class PhpGotoDeclarationHandler extends CompletionContributor implements GotoDeclarationHandler {

private static GotoCompletionContributor[] CONTRIBUTORS = new GotoCompletionContributor[] {
private static final GotoCompletionContributor<?>[] CONTRIBUTORS = new GotoCompletionContributor<?>[] {
new PhpArrayCallbackGotoCompletion(),
new GlobalStringClassGoto(),
new PhpDocTagGotoCompletionContributor(),
};

public PhpGotoDeclarationHandler() {
for (final GotoCompletionContributor contributor : CONTRIBUTORS) {
for (final GotoCompletionContributor<?> contributor : CONTRIBUTORS) {
extend(CompletionType.BASIC, contributor.getPattern(), new CompletionProvider<CompletionParameters>() {
@Override
protected void addCompletions(@NotNull CompletionParameters completionParameters, @NotNull ProcessingContext processingContext, @NotNull CompletionResultSet completionResultSet) {
Expand All @@ -46,7 +46,7 @@ public PsiElement[] getGotoDeclarationTargets(@Nullable PsiElement psiElement, i
}

Set<PsiElement> psiElements = new HashSet<>();
for (final GotoCompletionContributor contributor : CONTRIBUTORS) {
for (final GotoCompletionContributor<?> contributor : CONTRIBUTORS) {
if(!contributor.getPattern().accepts(psiElement)) {
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import de.espend.idea.php.toolbox.gotoCompletion.GotoCompletionContributor;
import de.espend.idea.php.toolbox.navigation.dict.PhpToolboxDeclarationHandlerParameter;
import de.espend.idea.php.toolbox.utils.ExtensionProviderUtil;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.jetbrains.php.lang.psi.elements.Parameter;
import com.jetbrains.php.refactoring.PhpNameSuggestionUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.WordUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -52,7 +51,7 @@ public SuggestedNameInfo getSuggestedNames(@NotNull PsiElement psiElement, PsiEl

// remove starting
if(item.toLowerCase().startsWith(end)) {
item = WordUtils.uncapitalize(item.substring(end.length()));
item = StringUtils.uncapitalize(item.substring(end.length()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ public boolean isCallTo(MethodReference e, String ClassInterfaceName, String met
/**
* @deprecated isCallTo with MethodReference
*/
@Deprecated
public boolean isCallTo(PsiElement e, String ClassInterfaceName, String methodName) {

// we need a full fqn name
Expand Down
Loading