-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare IconManagerCompat for asdev update
PiperOrigin-RevId: 556759207
- Loading branch information
1 parent
69872d9
commit 742c455
Showing
21 changed files
with
326 additions
and
22 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
...le/idea/blaze/android/run/testrecorder/TestRecorderBlazeCommandRunConfigurationProxy.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,43 @@ | ||
/* | ||
* Copyright 2023 The Bazel Authors. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.idea.blaze.android.run.testrecorder; | ||
|
||
import com.android.annotations.Nullable; | ||
import com.android.ddmlib.IDevice; | ||
import com.google.common.util.concurrent.ListenableFuture; | ||
import com.google.idea.blaze.android.run.runner.BlazeAndroidRunConfigurationRunner; | ||
import com.google.idea.blaze.base.run.BlazeCommandRunConfiguration; | ||
import com.intellij.execution.runners.ExecutionEnvironment; | ||
import java.util.List; | ||
|
||
/** Compat class for implementing TestRecorderBlazeCommandRunConfigurationProxy. */ | ||
public class TestRecorderBlazeCommandRunConfigurationProxy | ||
extends TestRecorderBlazeCommandRunConfigurationProxyBase { | ||
|
||
public TestRecorderBlazeCommandRunConfigurationProxy( | ||
BlazeCommandRunConfiguration baseConfiguration) { | ||
super(baseConfiguration); | ||
} | ||
|
||
@Override | ||
@Nullable | ||
public List<ListenableFuture<IDevice>> getDeviceFutures(ExecutionEnvironment environment) { | ||
return environment | ||
.getCopyableUserData(BlazeAndroidRunConfigurationRunner.DEVICE_SESSION_KEY) | ||
.deviceFutures | ||
.get(); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...le/idea/blaze/android/run/testrecorder/TestRecorderBlazeCommandRunConfigurationProxy.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,43 @@ | ||
/* | ||
* Copyright 2023 The Bazel Authors. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.idea.blaze.android.run.testrecorder; | ||
|
||
import com.android.annotations.Nullable; | ||
import com.android.ddmlib.IDevice; | ||
import com.google.common.util.concurrent.ListenableFuture; | ||
import com.google.idea.blaze.android.run.runner.BlazeAndroidRunConfigurationRunner; | ||
import com.google.idea.blaze.base.run.BlazeCommandRunConfiguration; | ||
import com.intellij.execution.runners.ExecutionEnvironment; | ||
import java.util.List; | ||
|
||
/** Compat class for implementing TestRecorderBlazeCommandRunConfigurationProxy. */ | ||
public class TestRecorderBlazeCommandRunConfigurationProxy | ||
extends TestRecorderBlazeCommandRunConfigurationProxyBase { | ||
|
||
public TestRecorderBlazeCommandRunConfigurationProxy( | ||
BlazeCommandRunConfiguration baseConfiguration) { | ||
super(baseConfiguration); | ||
} | ||
|
||
@Override | ||
@Nullable | ||
public List<ListenableFuture<IDevice>> getDeviceFutures(ExecutionEnvironment environment) { | ||
return environment | ||
.getCopyableUserData(BlazeAndroidRunConfigurationRunner.DEVICE_SESSION_KEY) | ||
.deviceFutures | ||
.get(); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...le/idea/blaze/android/run/testrecorder/TestRecorderBlazeCommandRunConfigurationProxy.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,43 @@ | ||
/* | ||
* Copyright 2023 The Bazel Authors. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.idea.blaze.android.run.testrecorder; | ||
|
||
import com.android.annotations.Nullable; | ||
import com.android.ddmlib.IDevice; | ||
import com.google.common.util.concurrent.ListenableFuture; | ||
import com.google.idea.blaze.android.run.runner.BlazeAndroidRunConfigurationRunner; | ||
import com.google.idea.blaze.base.run.BlazeCommandRunConfiguration; | ||
import com.intellij.execution.runners.ExecutionEnvironment; | ||
import java.util.List; | ||
|
||
/** Compat class for implementing TestRecorderBlazeCommandRunConfigurationProxy. */ | ||
public class TestRecorderBlazeCommandRunConfigurationProxy | ||
extends TestRecorderBlazeCommandRunConfigurationProxyBase { | ||
|
||
public TestRecorderBlazeCommandRunConfigurationProxy( | ||
BlazeCommandRunConfiguration baseConfiguration) { | ||
super(baseConfiguration); | ||
} | ||
|
||
@Override | ||
@Nullable | ||
public List<ListenableFuture<IDevice>> getDeviceFutures(ExecutionEnvironment environment) { | ||
return environment | ||
.getCopyableUserData(BlazeAndroidRunConfigurationRunner.DEVICE_SESSION_KEY) | ||
.deviceFutures | ||
.get(); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...le/idea/blaze/android/run/testrecorder/TestRecorderBlazeCommandRunConfigurationProxy.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,43 @@ | ||
/* | ||
* Copyright 2023 The Bazel Authors. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.idea.blaze.android.run.testrecorder; | ||
|
||
import com.android.annotations.Nullable; | ||
import com.android.ddmlib.IDevice; | ||
import com.google.common.util.concurrent.ListenableFuture; | ||
import com.google.idea.blaze.android.run.runner.BlazeAndroidRunConfigurationRunner; | ||
import com.google.idea.blaze.base.run.BlazeCommandRunConfiguration; | ||
import com.intellij.execution.runners.ExecutionEnvironment; | ||
import java.util.List; | ||
|
||
/** Compat class for implementing TestRecorderBlazeCommandRunConfigurationProxy. */ | ||
public class TestRecorderBlazeCommandRunConfigurationProxy | ||
extends TestRecorderBlazeCommandRunConfigurationProxyBase { | ||
|
||
public TestRecorderBlazeCommandRunConfigurationProxy( | ||
BlazeCommandRunConfiguration baseConfiguration) { | ||
super(baseConfiguration); | ||
} | ||
|
||
@Override | ||
@Nullable | ||
public List<ListenableFuture<IDevice>> getDeviceFutures(ExecutionEnvironment environment) { | ||
return environment | ||
.getCopyableUserData(BlazeAndroidRunConfigurationRunner.DEVICE_SESSION_KEY) | ||
.deviceFutures | ||
.get(); | ||
} | ||
} |
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
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
33 changes: 33 additions & 0 deletions
33
sdkcompat/asdev/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.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,33 @@ | ||
/* | ||
* Copyright 2023 The Bazel Authors. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.idea.sdkcompat.ui.icons; | ||
|
||
import com.intellij.ui.CoreIconManager; | ||
import com.intellij.ui.IconManager; | ||
|
||
/** Compat class for IconManager. */ | ||
public class IconManagerCompat { | ||
|
||
private IconManagerCompat() {} | ||
|
||
public static void activateCoreIconManager() throws Throwable { | ||
IconManager.activate(new CoreIconManager()); | ||
} | ||
|
||
public static void deactivate() { | ||
IconManager.deactivate(); | ||
} | ||
} |
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
33 changes: 33 additions & 0 deletions
33
sdkcompat/v222/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.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,33 @@ | ||
/* | ||
* Copyright 2023 The Bazel Authors. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.idea.sdkcompat.ui.icons; | ||
|
||
import com.intellij.ui.CoreIconManager; | ||
import com.intellij.ui.IconManager; | ||
|
||
/** Compat class for IconManager. */ | ||
public class IconManagerCompat { | ||
|
||
private IconManagerCompat() {} | ||
|
||
public static void activateCoreIconManager() throws Throwable { | ||
IconManager.activate(new CoreIconManager()); | ||
} | ||
|
||
public static void deactivate() { | ||
IconManager.deactivate(); | ||
} | ||
} |
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
33 changes: 33 additions & 0 deletions
33
sdkcompat/v223/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.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,33 @@ | ||
/* | ||
* Copyright 2023 The Bazel Authors. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.idea.sdkcompat.ui.icons; | ||
|
||
import com.intellij.ui.CoreIconManager; | ||
import com.intellij.ui.IconManager; | ||
|
||
/** Compat class for IconManager. */ | ||
public class IconManagerCompat { | ||
|
||
private IconManagerCompat() {} | ||
|
||
public static void activateCoreIconManager() throws Throwable { | ||
IconManager.activate(new CoreIconManager()); | ||
} | ||
|
||
public static void deactivate() { | ||
IconManager.deactivate(); | ||
} | ||
} |
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.