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
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ${NAME} extends ${GENERIC_BUTTON} implements ${DATA_PROVIDER_TYPE}

#end
return $this->wrapButtonSettings(
__('${LABEL}'),
__('${LABEL}')->getText(),
'${CLASS}',
${ON_CLICK},
${DATA_ATTRS},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.intellij.util.io.DataExternalizer;
import com.intellij.util.io.EnumeratorStringDescriptor;
import com.intellij.util.io.KeyDescriptor;
import com.jetbrains.php.PhpIndex;
import com.jetbrains.php.lang.PhpLangUtil;
import com.magento.idea.magento2plugin.magento.files.ModuleDiXml;
import com.magento.idea.magento2plugin.project.Settings;
Expand Down Expand Up @@ -91,7 +90,6 @@ public Map<String, Set<PluginData>> map(final @NotNull FileContent fileContent)

@SuppressWarnings("checkstyle:LineLength")
private Set<PluginData> getPluginsForType(final XmlTag typeNode) {
final PhpIndex phpIndex = PhpIndex.getInstance(typeNode.getProject());
final Set<PluginData> results = new HashSet<>();

for (final XmlTag pluginTag: typeNode.findSubTags(ModuleDiXml.PLUGIN_TAG_NAME)) {
Expand All @@ -100,12 +98,7 @@ private Set<PluginData> getPluginsForType(final XmlTag typeNode) {

if (pluginType != null && !pluginType.isEmpty()) {
final PluginData pluginData = getPluginDataObject(pluginType, getIntegerOrZeroValue(pluginSortOrder));
try {
phpIndex.getAnyByFQN(pluginData.getType());
results.add(pluginData);
} catch (Throwable exception) { //NOPMD
//do nothing
}
results.add(pluginData);
}
}

Expand All @@ -128,7 +121,7 @@ private PluginData getPluginDataObject(
final String pluginType,
final Integer sortOrder
) {
return new PluginData(pluginType, sortOrder);
return new PluginData(pluginType, sortOrder);
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class MyBackButton extends GenericButton implements ButtonProviderInterface
public function getButtonData(): array
{
return $this->wrapButtonSettings(
__('Back To Grid'),
__('Back To Grid')->getText(),
'back',
sprintf("location.href = '%s';", $this->getUrl('*/*/')),
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class MyCustom extends GenericButton implements ButtonProviderInterface
public function getButtonData(): array
{
return $this->wrapButtonSettings(
__('Custom Button'),
__('Custom Button')->getText(),
'custom',
'',
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function getButtonData(): array
}

return $this->wrapButtonSettings(
__('Delete'),
__('Delete')->getText(),
'delete',
sprintf("deleteConfirm('%s', '%s')",
__('Are you sure you want to delete this book?'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SaveBlock extends GenericButton implements ButtonProviderInterface
public function getButtonData(): array
{
return $this->wrapButtonSettings(
__('Save'),
__('Save')->getText(),
'save primary',
'',
[
Expand Down