Skip to content

Commit

Permalink
Delete the Mockup Editor
Browse files Browse the repository at this point in the history
Bug: N/A
Test: N/A
Change-Id: I4bc578a29b48fc3667738bdedccf28c8937cdd4e

GitOrigin-RevId: 7b7a4910813b6e4b81a5e8bb2ed5a8d6e78659ba
  • Loading branch information
jgaillard85 authored and intellij-monorepo-bot committed Jul 27, 2022
1 parent 968f92a commit 411bef3
Show file tree
Hide file tree
Showing 88 changed files with 1 addition and 11,132 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@ public static void validate() {
NELE, "animated.motion.horizontal", "Display motion editor horizontally",
"Controls the placement of the motion editor (horizontal versus vertical).",
false);
public static final Flag<Boolean> NELE_MOCKUP_EDITOR = Flag.create(
NELE, "mockup.editor", "Enable the Mockup Editor",
"Enable the Mockup Editor to ease the creation of Layouts from a design file.",
false);

public static final Flag<Boolean> NELE_RENDER_DIAGNOSTICS = Flag.create(
NELE, "diagnostics", "Enable rendering on-screen stats",
Expand Down
10 changes: 0 additions & 10 deletions android/src/org/jetbrains/android/dom/AttributeProcessingUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
import static com.android.SdkConstants.ATTR_LISTHEADER;
import static com.android.SdkConstants.ATTR_LISTITEM;
import static com.android.SdkConstants.ATTR_MENU;
import static com.android.SdkConstants.ATTR_MOCKUP;
import static com.android.SdkConstants.ATTR_MOCKUP_CROP;
import static com.android.SdkConstants.ATTR_MOCKUP_OPACITY;
import static com.android.SdkConstants.ATTR_OPEN_DRAWER;
import static com.android.SdkConstants.ATTR_PARENT_TAG;
import static com.android.SdkConstants.ATTR_SHOW_AS_ACTION;
Expand Down Expand Up @@ -552,13 +549,6 @@ public static void processLayoutAttributes(@NotNull AndroidFacet facet,
registerToolsAttribute(ATTR_LISTITEM, callback);
}
}

// Mockup attributes can be associated with any View, even include tag
if (StudioFlags.NELE_MOCKUP_EDITOR.get()) {
registerToolsAttribute(ATTR_MOCKUP, callback);
registerToolsAttribute(ATTR_MOCKUP_CROP, callback);
registerToolsAttribute(ATTR_MOCKUP_OPACITY, callback);
}
}

if (element instanceof Tag || element instanceof Data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
import static com.android.SdkConstants.ATTR_LISTITEM;
import static com.android.SdkConstants.ATTR_LOCALE;
import static com.android.SdkConstants.ATTR_MENU;
import static com.android.SdkConstants.ATTR_MOCKUP;
import static com.android.SdkConstants.ATTR_MOCKUP_CROP;
import static com.android.SdkConstants.ATTR_MOCKUP_OPACITY;
import static com.android.SdkConstants.ATTR_OPEN_DRAWER;
import static com.android.SdkConstants.ATTR_PARENT_TAG;
import static com.android.SdkConstants.ATTR_SHOW_IN;
Expand Down Expand Up @@ -117,9 +114,6 @@ public class ToolsAttributeUtil {
.put(ATTR_LAYOUT, singletonList(AttributeFormat.REFERENCE))
.put(ATTR_LOCALE, NO_FORMATS)
.put(ATTR_MENU, NO_FORMATS)
.put(ATTR_MOCKUP, singletonList(AttributeFormat.STRING))
.put(ATTR_MOCKUP_OPACITY, singletonList(AttributeFormat.FLOAT))
.put(ATTR_MOCKUP_CROP, singletonList(AttributeFormat.STRING))
.put(ATTR_OPEN_DRAWER, singletonList(AttributeFormat.ENUM))
.put(ATTR_PARENT_TAG, singletonList(AttributeFormat.STRING))
.put(ATTR_SHOW_IN, singletonList(AttributeFormat.REFERENCE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import com.android.tools.idea.uibuilder.scene.LayoutlibSceneManager
import com.android.tools.idea.uibuilder.surface.BorderLayer
import com.android.tools.idea.uibuilder.surface.ClassLoadingDebugLayer
import com.android.tools.idea.uibuilder.surface.DiagnosticsLayer
import com.android.tools.idea.uibuilder.surface.MockupLayer
import com.android.tools.idea.uibuilder.surface.NlDesignSurface
import com.android.tools.idea.uibuilder.surface.ScreenView
import com.android.tools.idea.uibuilder.surface.ScreenViewLayer
Expand Down Expand Up @@ -80,7 +79,6 @@ internal val COMPOSE_BLUEPRINT_SCREEN_VIEW_PROVIDER = object : ScreenViewProvide
if (it.hasBorderLayer()) {
add(BorderLayer(it))
}
add(MockupLayer(it))
add(SceneLayer(it.surface, it, true))
}.build()
}
Expand Down
48 changes: 0 additions & 48 deletions designer/lint_baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,38 +393,6 @@
line="689"/>
</issue>

<issue
id="DefaultLocale"
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead">
<location
file="src/com/android/tools/idea/uibuilder/mockup/editor/creators/WidgetCreator.java"
line="233"/>
</issue>

<issue
id="DefaultLocale"
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead">
<location
file="src/com/android/tools/idea/uibuilder/mockup/editor/creators/WidgetCreator.java"
line="235"/>
</issue>

<issue
id="DefaultLocale"
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead">
<location
file="src/com/android/tools/idea/uibuilder/mockup/editor/creators/WidgetCreator.java"
line="247"/>
</issue>

<issue
id="DefaultLocale"
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead">
<location
file="src/com/android/tools/idea/uibuilder/mockup/editor/creators/WidgetCreator.java"
line="249"/>
</issue>

<issue
id="AvoidByLazy"
message="Avoid `by lazy` for simple lazy initialization">
Expand Down Expand Up @@ -881,14 +849,6 @@
line="37"/>
</issue>

<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope">
<location
file="src/com/android/tools/idea/uibuilder/mockup/colorextractor/DoublesColorExtractor.java"
line="145"/>
</issue>

<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope">
Expand Down Expand Up @@ -1145,12 +1105,4 @@
line="176"/>
</issue>

<issue
id="SwingWorker"
message="Do not use `javax.swing.SwingWorker`, use `com.intellij.util.concurrency.SwingWorker` instead. See `go/do-not-freeze`.">
<location
file="src/com/android/tools/idea/uibuilder/mockup/colorextractor/DoublesColorExtractor.java"
line="132"/>
</issue>

</issues>

This file was deleted.

112 changes: 0 additions & 112 deletions designer/src/com/android/tools/idea/actions/MockupEditAction.java

This file was deleted.

Loading

0 comments on commit 411bef3

Please sign in to comment.