use of com.intellij.openapi.actionSystem.Presentation in project android by JetBrains.
the class AndroidInlineStyleTest method doInlineStyleReferenceAction.
private void doInlineStyleReferenceAction(boolean inlineThisOnly, boolean enabled) {
final Presentation p = myFixture.testAction(new AndroidInlineStyleReferenceAction(new AndroidInlineTestConfig(inlineThisOnly)));
assertEquals(enabled, p.isEnabled());
assertTrue(p.isVisible());
}
use of com.intellij.openapi.actionSystem.Presentation in project android by JetBrains.
the class AndroidInlineStyleTest method doTestDisabled.
private void doTestDisabled() {
final Presentation presentation = performAction(true, "res/layout").getFirst();
assertFalse(presentation.isEnabled());
assertTrue(presentation.isVisible());
}
use of com.intellij.openapi.actionSystem.Presentation in project android by JetBrains.
the class AndroidExtractAsIncludeTest method doTestDisabled.
private void doTestDisabled() {
final String testName = getTestName(true);
final VirtualFile f = myFixture.copyFileToProject(BASE_PATH + testName + ".xml", "res/layout/test.xml");
myFixture.configureFromExistingVirtualFile(f);
final Presentation p = myFixture.testAction(new AndroidExtractAsIncludeAction(new AndroidExtractAsIncludeAction.MyTestConfig("extracted.xml")));
assertTrue(p.isVisible());
assertFalse(p.isEnabled());
}
use of com.intellij.openapi.actionSystem.Presentation in project android by JetBrains.
the class AndroidExtractStyleTest method doTestDisabled.
private void doTestDisabled() {
final String testName = getTestName(true);
final VirtualFile f = myFixture.copyFileToProject(BASE_PATH + testName + ".xml", "res/layout/test" + testName + ".xml");
myFixture.configureFromExistingVirtualFile(f);
final Presentation presentation = myFixture.testAction(new AndroidExtractStyleAction());
assertFalse(presentation.isEnabled());
assertTrue(presentation.isVisible());
}
use of com.intellij.openapi.actionSystem.Presentation in project android by JetBrains.
the class AndroidExtractStyleTest method doTestHidden.
private void doTestHidden() {
final String testName = getTestName(true);
final VirtualFile f = myFixture.copyFileToProject(BASE_PATH + testName + ".xml", "res/values/test" + testName + ".xml");
myFixture.configureFromExistingVirtualFile(f);
final Presentation presentation = myFixture.testAction(new AndroidExtractStyleAction());
assertFalse(presentation.isVisible());
}
Aggregations