X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.common%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fcommon%2Factions%2FCollapseAll.java;h=8c61802332f191ef430707dcf73ff8faaa4cfaef;hp=582d2bc028a1bb8316a6127df1ad03578f24eb7d;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/actions/CollapseAll.java b/bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/actions/CollapseAll.java index 582d2bc02..8c6180233 100644 --- a/bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/actions/CollapseAll.java +++ b/bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/actions/CollapseAll.java @@ -1,35 +1,35 @@ -/******************************************************************************* - * Copyright (c) 2016 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Semantum Oy - initial API and implementation - *******************************************************************************/ -package org.simantics.browsing.ui.common.actions; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.ui.handlers.HandlerUtil; -import org.simantics.browsing.ui.GraphExplorer; -import org.simantics.browsing.ui.common.NodeContextUtil; - -/** - * @author Tuukka Lehtonen - * @since 1.24.0 - */ -public class CollapseAll extends AbstractHandler { - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - GraphExplorer explorer = HandlerUtil.getActivePart(event).getAdapter(GraphExplorer.class); - if (explorer != null) - NodeContextUtil.collapseAllNodes(explorer); - return null; - } - -} +/******************************************************************************* + * Copyright (c) 2016 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Semantum Oy - initial API and implementation + *******************************************************************************/ +package org.simantics.browsing.ui.common.actions; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.ui.handlers.HandlerUtil; +import org.simantics.browsing.ui.GraphExplorer; +import org.simantics.browsing.ui.common.NodeContextUtil; + +/** + * @author Tuukka Lehtonen + * @since 1.24.0 + */ +public class CollapseAll extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + GraphExplorer explorer = HandlerUtil.getActivePart(event).getAdapter(GraphExplorer.class); + if (explorer != null) + NodeContextUtil.collapseAllNodes(explorer); + return null; + } + +}