Skip to content
Open
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
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
language: java
install: true

env:
global:
- LOCAL_ENV_RUN=true

matrix:
include:
- os: linux
Expand Down
1 change: 1 addition & 0 deletions buildspec/linuxTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cache:
env:
variables:
CI: true
LOCAL_ENV_RUN: true

phases:
install:
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publishToken=
publishChannel=

# Common dependencies
ideProfileName=2019.2
ideProfileName=2019.3
kotlinVersion=1.3.21
awsSdkVersion=2.6.5
ideaPluginVersion=0.4.9
Expand Down
14 changes: 10 additions & 4 deletions intellijJVersions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,31 @@ static def ideProfiles() {
],
"2019.3": [
"IC": [
version: "IC-193.4099-EAP-CANDIDATE-SNAPSHOT", // Update to actual version when it gets released
version: "IC-193.4386-EAP-CANDIDATE-SNAPSHOT", // Update to actual version when it gets released
plugins: [
"yaml",
"PythonCore:193.4099.13",
"PythonCore:193.4386.10",
"java",
"gradle",
"maven",
"properties" // Used by Maven
]
],
"IU": [
version: "IU-193.4099-EAP-CANDIDATE-SNAPSHOT",
version: "IU-193.4386-EAP-CANDIDATE-SNAPSHOT",
plugins: [
"PythonCore:193.4099.13",
"PythonCore:193.4386.10",
"yaml",
"JavaScriptLanguage",
"JavaScriptDebugger",
"CSS",
]
],
"RD": [
version: "RD-2019.3-SNAPSHOT",
plugins: [
"yaml"
]
]
]
]
Expand Down
3 changes: 3 additions & 0 deletions jetbrains-core/resources/META-INF/ext-rider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<component>
<implementation-class>software.aws.toolkits.jetbrains.services.lambda.LambdaPsiHost</implementation-class>
</component>
<component>
<implementation-class>software.aws.toolkits.jetbrains.settings.LambdaGutterMarkSettings</implementation-class>
</component>
</project-components>

<extensions defaultExtensionNs="com.intellij">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.intellij.openapi.components.Storage
import com.intellij.openapi.project.Project

@State(name = "lambda", storages = [Storage("aws.xml")])
class LambdaSettings : PersistentStateComponent<LambdaConfiguration> {
class LambdaSettings(private val project: Project) : PersistentStateComponent<LambdaConfiguration> {
private var state = LambdaConfiguration()

override fun getState(): LambdaConfiguration = state
Expand All @@ -23,6 +23,7 @@ class LambdaSettings : PersistentStateComponent<LambdaConfiguration> {
get() = state.showAllHandlerGutterIcons
set(value) {
state.showAllHandlerGutterIcons = value
project.messageBus.syncPublisher(LambdaSettingsChangeListener.TOPIC).samShowAllHandlerGutterIconsSettingsChange(value)
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package software.aws.toolkits.jetbrains.settings

import com.intellij.util.messages.Topic
import java.util.EventListener

interface LambdaSettingsChangeListener : EventListener {
companion object {
@JvmStatic val TOPIC = Topic("SAM Setting has been changed", LambdaSettingsChangeListener::class.java)
}

/**
* SAM CLI version evaluation finished for the chosen profile, and it may be validated synchronously now.
*/
fun samShowAllHandlerGutterIconsSettingsChange(isShow: Boolean)
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class RegionSelector : ComboBox<AwsRegion>() {

private inner class Renderer : SimpleListCellRenderer<AwsRegion>() {
override fun customize(
list: JList<out AwsRegion>?,
list: JList<out AwsRegion>,
value: AwsRegion?,
index: Int,
selected: Boolean,
Expand Down
7 changes: 7 additions & 0 deletions jetbrains-rider/ReSharper.AWS/ReSharper.AWS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AWS.Psi", "src\AWS.Psi\AWS.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AWS.Localization", "src\AWS.Localization\AWS.Localization.csproj", "{A7D464FD-2D77-4BDB-9F89-A60C090B67FA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AWS.Settings", "src\AWS.Settings\AWS.Settings.csproj", "{03F889DD-2864-4EC5-911E-FC3AB883FA94}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -28,10 +30,15 @@ Global
{A7D464FD-2D77-4BDB-9F89-A60C090B67FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7D464FD-2D77-4BDB-9F89-A60C090B67FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7D464FD-2D77-4BDB-9F89-A60C090B67FA}.Release|Any CPU.Build.0 = Release|Any CPU
{03F889DD-2864-4EC5-911E-FC3AB883FA94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03F889DD-2864-4EC5-911E-FC3AB883FA94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03F889DD-2864-4EC5-911E-FC3AB883FA94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03F889DD-2864-4EC5-911E-FC3AB883FA94}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{168E7AB3-EA27-42F3-AAAA-EB542274DF72} = {242F86AA-AA1D-40B5-97DE-0C139E777832}
{A6C3DF73-FEA6-4A20-B45C-051D7D02C510} = {242F86AA-AA1D-40B5-97DE-0C139E777832}
{A7D464FD-2D77-4BDB-9F89-A60C090B67FA} = {242F86AA-AA1D-40B5-97DE-0C139E777832}
{03F889DD-2864-4EC5-911E-FC3AB883FA94} = {242F86AA-AA1D-40B5-97DE-0C139E777832}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<RootNamespace>ReSharper.AWS</RootNamespace>
<RootNamespace>AWS.Daemon</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Rider.SDK" Version="$(RiderSDKVersion)" />
<PackageReference Include="JetBrains.Rider.SDK" Version="$(RiderSDKVersion)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AWS.Localization\AWS.Localization.csproj" />
<ProjectReference Include="..\AWS.Localization\AWS.Localization.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using JetBrains.Util;
using JetBrains.Util.Logging;

namespace ReSharper.AWS.Lambda
namespace AWS.Daemon.Lambda
{
public static class LambdaFinder
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using JetBrains.ReSharper.Psi.Modules;
using JetBrains.RiderTutorials.Utils;

namespace ReSharper.AWS.Lambda
namespace AWS.Daemon.Lambda
{
public static class LambdaHandlerUtils
{
Expand Down
32 changes: 16 additions & 16 deletions jetbrains-rider/ReSharper.AWS/src/AWS.Daemon/Lambda/LambdaHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
using JetBrains.ReSharper.Resources.Shell;
using JetBrains.Rider.Model;

namespace ReSharper.AWS.Lambda
namespace AWS.Daemon.Lambda
{
[SolutionComponent]
public class LambdaHost
{
private readonly LambdaModel myModel;
private readonly ISymbolCache mySymbolCache;
private readonly PsiIconManager myPsiIconManager;
private readonly IconHost myIconHost;
private readonly LambdaModel _model;
private readonly ISymbolCache _symbolCache;
private readonly PsiIconManager _psiIconManager;
private readonly IconHost _iconHost;

public LambdaHost(ISolution solution, ISymbolCache symbolCache, PsiIconManager psiIconManager, IconHost iconHost)
{
myModel = solution.GetProtocolSolution().GetLambdaModel();
mySymbolCache = symbolCache;
myPsiIconManager = psiIconManager;
myIconHost = iconHost;
_model = solution.GetProtocolSolution().GetLambdaModel();
_symbolCache = symbolCache;
_psiIconManager = psiIconManager;
_iconHost = iconHost;

myModel.DetermineHandlers.Set((lifetime, unit) =>
_model.DetermineHandlers.Set((lifetime, unit) =>
{
var task = new RdTask<List<HandlerCompletionItem>>();
task.Set(DetermineHandlers(solution));
Expand All @@ -37,17 +37,17 @@ public LambdaHost(ISolution solution, ISymbolCache symbolCache, PsiIconManager p

public void RunLambda(string methodName, string handler)
{
myModel.RunLambda(new LambdaRequest(methodName, handler));
_model.RunLambda(new LambdaRequest(methodName, handler));
}

public void DebugLambda(string methodName, string handler)
{
myModel.DebugLambda(new LambdaRequest(methodName, handler));
_model.DebugLambda(new LambdaRequest(methodName, handler));
}

public void CreateNewLambda(string methodName, string handler)
{
myModel.CreateNewLambda(new LambdaRequest(methodName, handler));
_model.CreateNewLambda(new LambdaRequest(methodName, handler));
}

private List<HandlerCompletionItem> DetermineHandlers(ISolution solution)
Expand All @@ -67,7 +67,7 @@ private List<HandlerCompletionItem> DetermineHandlers(ISolution solution)
{
using (CompilationContextCookie.OverrideOrCreate(psiModule.GetContextFromModule()))
{
var scope = mySymbolCache.GetSymbolScope(psiModule, false, true);
var scope = _symbolCache.GetSymbolScope(psiModule, false, true);
var namespaces = scope.GlobalNamespace.GetNestedNamespaces(scope);

foreach (var @namespace in namespaces)
Expand Down Expand Up @@ -120,8 +120,8 @@ private void GetHandlers(IMethod method, ICollection<HandlerCompletionItem> hand
if (!LambdaFinder.IsSuitableLambdaMethod(method)) return;

var handlerString = LambdaHandlerUtils.ComposeHandlerString(method);
var iconId = myPsiIconManager.GetImage(method.GetElementType());
var iconModel = myIconHost.Transform(iconId);
var iconId = _psiIconManager.GetImage(method.GetElementType());
var iconModel = _iconHost.Transform(iconId);
handlers.Add(new HandlerCompletionItem(handlerString, iconModel));
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using AWS.Daemon.RunMarkers;
using JetBrains.TextControl.DocumentMarkup;
using ReSharper.AWS.RunMarkers;

[assembly:
RegisterHighlighter(
Expand All @@ -10,10 +10,10 @@
)
]

namespace ReSharper.AWS.RunMarkers
namespace AWS.Daemon.RunMarkers
{
public static class LambdaRunMarkerAttributeIds
{
public const string LAMBDA_RUN_METHOD_MARKER_ID = "AWS Lambda Run Method Gutter Mark";
}
}
}
Loading