All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.netbeans.spi.diff.MergeVisualizer Maven / Gradle / Ivy

The newest version!
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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 org.netbeans.spi.diff;

import java.awt.Component;
import java.io.IOException;

import org.netbeans.api.diff.Difference;
import org.netbeans.api.diff.StreamSource;

/**
 * This class represents a merge visualizer. It's used as a visual conflicts
 * resolution tool for the process of merging of file conflicts.
 * 

The registered Merge Visualizers can be obtained via {@link org.openide.util.Lookup} * (e.g. you can get the default merge provider by * Lookup.getDefault().lookup(MergeVisualizer.class)) * * @author Martin Entlicher */ public abstract class MergeVisualizer extends Object { /** * Show the visual representation of the merging process of two sources. * The result of the merging process can be saved into a Writer even * before all conflicts are actually resolved. * * @param diffs The list of conflicts. * @param source1 the source of the first file * @param source2 the source of the second file * @param result the information about the result source * @return The Component representing the diff visual representation * or null, when the representation is outside the IDE. * @throws IOException when the reading from input streams fails. */ public abstract Component createView(Difference[] diffs, StreamSource source1, StreamSource source2, StreamSource result) throws IOException ; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy