conflict_resolution
stringlengths
27
16k
<<<<<<< private static final String CHAT_CONVERSATION_TYPE = "conversationType"; ======= >>>>>>> private static final String CHAT_CONVERSATION_TYPE = "conversationType"; <<<<<<< + CHAT_CONVERSATION_TYPE + " TEXT, "//会话类型 ======= >>>>>>> + CHAT_CONVERSATION_TYPE + " TEXT, "//会话类型 <<<<<<< contentValues.put(CHAT_CONVERSATION_TYPE, message.getConversationType()); ======= >>>>>>> contentValues.put(CHAT_CONVERSATION_TYPE, message.getConversationType());
<<<<<<< import com.teamwizardry.wizardry.common.item.ItemWizardry; import com.teamwizardry.wizardry.init.ModBlocks; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.color.IItemColor; ======= >>>>>>> import com.teamwizardry.wizardry.common.item.ItemWizardry;
<<<<<<< import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.EventBus; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.PacketLoggingHandler; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.apache.logging.log4j.Logger; ======= >>>>>>> import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.EventBus; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.PacketLoggingHandler; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.apache.logging.log4j.Logger; <<<<<<< import com.teamwizardry.wizardry.api.gui.WizardHandler; import com.teamwizardry.wizardry.api.module.ModuleList; ======= import com.teamwizardry.wizardry.api.capability.WizardHandler; >>>>>>> import com.teamwizardry.wizardry.api.capability.WizardHandler; import com.teamwizardry.wizardry.api.module.ModuleList;
<<<<<<< import java.util.HashMap; import java.util.Map; ======= import me.lordsaad.wizardry.gui.book.MainIndex; import me.lordsaad.wizardry.gui.book.pages.GuiPageText; >>>>>>> import java.util.HashMap; import java.util.Map; <<<<<<< register("text", GuiPageText::new); } public static void register(String name, IPageGuiSupplier supplier) { map.putIfAbsent(name, supplier); } public static GuiScreen construct(GuiScreen parent, String path, int pageNum) { DataNode data = PageDataManager.getPageData(path); DataNode pagesList = data.get("pages"); DataNode pageData = pagesList.get(pageNum); String type = pageData.get("type").asStringOr("error"); if (map.containsKey(type)) { if (pageData.isMap()) { if (pagesList.get(pageNum + 1).exists()) { pageData.asMap().put("hasNext", new DataNode("true")); } if (pagesList.get(pageNum + -1).exists()) { pageData.asMap().put("hasPrev", new DataNode("true")); } } return map.get(type).create(parent, pageData, data, path, pageNum); } return null; } @FunctionalInterface public interface IPageGuiSupplier { GuiScreen create(GuiScreen parent, DataNode node, DataNode globalNode, String path, int page); } ======= register("text", (parent, node, globalNode, path, page) -> { return new GuiPageText(parent, node, globalNode, path, page); }); } public static void register(String name, IPageGuiSupplier supplier) { map.put(name, supplier); } public static GuiScreen construct(GuiScreen parent, String path, int pageNum) { if("/".equals(path)) { return new MainIndex(); } DataNode data = PageDataManager.getPageData(path); DataNode pagesList = data.get("pages"); DataNode pageData = pagesList.get(pageNum); String type = pageData.get("type").asStringOr("error"); if(map.containsKey(type)) { if(pageData.isMap()) { if(pagesList.get(pageNum+1).exists()) { pageData.asMap().put("hasNext", new DataNode("true")); } if(pagesList.get(pageNum+-1).exists()) { pageData.asMap().put("hasPrev", new DataNode("true")); } } return map.get(type).create(parent, pageData, data, path, pageNum); } return null; } @FunctionalInterface public static interface IPageGuiSupplier { GuiScreen create(GuiScreen parent, DataNode node, DataNode globalNode, String path, int page); } >>>>>>> register("text", GuiPageText::new); } public static void register(String name, IPageGuiSupplier supplier) { map.putIfAbsent(name, supplier); } public static GuiScreen construct(GuiScreen parent, String path, int pageNum) { if("/".equals(path)) { return new MainIndex(); } DataNode data = PageDataManager.getPageData(path); DataNode pagesList = data.get("pages"); DataNode pageData = pagesList.get(pageNum); String type = pageData.get("type").asStringOr("error"); if (map.containsKey(type)) { if (pageData.isMap()) { if (pagesList.get(pageNum + 1).exists()) { pageData.asMap().put("hasNext", new DataNode("true")); } if (pagesList.get(pageNum + -1).exists()) { pageData.asMap().put("hasPrev", new DataNode("true")); } } return map.get(type).create(parent, pageData, data, path, pageNum); } return null; } @FunctionalInterface public interface IPageGuiSupplier { GuiScreen create(GuiScreen parent, DataNode node, DataNode globalNode, String path, int page); }
<<<<<<< ======= @Deprecated // since 2.11, use overloaded variant protected final boolean _parseBooleanPrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { return _parseBooleanPrimitive(ctxt, p); } >>>>>>> <<<<<<< protected final byte _parseBytePrimitive(DeserializationContext ctxt, JsonParser p, Class<?> targetType) ======= @Deprecated // since 2.12 protected boolean _parseBooleanFromInt(JsonParser p, DeserializationContext ctxt) throws IOException { // 13-Oct-2016, tatu: As per [databind#1324], need to be careful wrt // degenerate case of huge integers, legal in JSON. // ... this is, on the other hand, probably wrong/sub-optimal for non-JSON // input. For now, no rea _verifyNumberForScalarCoercion(ctxt, p); // Anyway, note that since we know it's valid (JSON) integer, it can't have // extra whitespace to trim. return !"0".equals(p.getText()); } @Deprecated // since 2.12, use overloaded variant protected final byte _parseBytePrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { return _parseBytePrimitive(ctxt, p); } /** * @since 2.12 */ protected final byte _parseBytePrimitive(DeserializationContext ctxt, JsonParser p) >>>>>>> protected final byte _parseBytePrimitive(DeserializationContext ctxt, JsonParser p) <<<<<<< ======= @Deprecated // since 2.12, use overloaded variant protected final short _parseShortPrimitive(JsonParser p, DeserializationContext ctxt) throws IOException { return _parseShortPrimitive(ctxt, p); } >>>>>>> <<<<<<< return ((Number) ctxt.handleUnexpectedToken(getValueType(ctxt), p)).intValue(); ======= return ((Number) ctxt.handleUnexpectedToken(Integer.TYPE, p)).intValue(); >>>>>>> return ((Number) ctxt.handleUnexpectedToken(ctxt.constructType(Integer.TYPE), p)).intValue();
<<<<<<< private HashMap<Entity, Integer> entityToTicks = new HashMap<>(); private HashMap<Entity, Entity> entityToCaster = new HashMap<>(); private HashMap<Entity, Pair<Double, Double>> entityToPotency = new HashMap<>(); ======= private HashMap<Entity, TrackingEntry> entityToEntry = new HashMap<>(); private LinkedList<TrackingEntry> newEntries = new LinkedList<>(); >>>>>>> private HashMap<Entity, TrackingEntry> entityToEntry = new HashMap<>(); private LinkedList<TrackingEntry> newEntries = new LinkedList<>(); <<<<<<< entityToTicks.put(target, numPoints); entityToCaster.put(target, caster); entityToPotency.put(target, new Pair<>(potency, duration)); ======= newEntries.add(new TrackingEntry(numPoints, dist, caster, target)); >>>>>>> newEntries.add(new TrackingEntry(numPoints, potency, duration, caster, target)); <<<<<<< entityToTicks.keySet().removeIf(entity -> { Entity caster = entityToCaster.get(entity); int ticks = entityToTicks.get(entity); Pair<Double, Double> pair = entityToPotency.get(entity); double potency = pair.getFirst(); double duration = pair.getSecond(); ======= newEntries.stream().forEach(e -> entityToEntry.put(e.getTarget(), e)); newEntries.clear(); entityToEntry.keySet().removeIf(entity -> { TrackingEntry entry = entityToEntry.get(entity); Entity caster = entry.getCaster(); int ticks = entry.getTicks(); double potency = entry.getPotency(); >>>>>>> newEntries.stream().forEach(e -> entityToEntry.put(e.getTarget(), e)); newEntries.clear(); entityToEntry.keySet().removeIf(entity -> { TrackingEntry entry = entityToEntry.get(entity); Entity caster = entry.getCaster(); int ticks = entry.getTicks(); double potency = entry.getPotency(); double duration = entry.getDuration(); <<<<<<< entityToCaster.remove(entity); entityToPotency.remove(entity); entity.setFire((int) duration); ======= entity.setFire((int) potency); >>>>>>> entity.setFire((int) duration);
<<<<<<< import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Set; import me.lordsaad.wizardry.api.modules.attribute.AttributeModifier.Operation; import me.lordsaad.wizardry.api.modules.attribute.AttributeModifier.Priority; ======= >>>>>>> import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Set; import me.lordsaad.wizardry.api.modules.attribute.AttributeModifier.Operation; import me.lordsaad.wizardry.api.modules.attribute.AttributeModifier.Priority;
<<<<<<< import com.teamwizardry.wizardry.api.spell.ProcessData.DataType; import com.teamwizardry.wizardry.api.spell.SpellDataTypes.BlockSet; import com.teamwizardry.wizardry.api.spell.SpellDataTypes.BlockStateCache; ======= import com.teamwizardry.wizardry.api.spell.attribute.AttributeModifier; import com.teamwizardry.wizardry.api.spell.attribute.AttributeRegistry; import com.teamwizardry.wizardry.api.spell.attribute.Operation; import com.teamwizardry.wizardry.api.spell.attribute.AttributeRegistry.Attribute; import kotlin.Pair; >>>>>>> import com.teamwizardry.wizardry.api.spell.attribute.AttributeModifier; import com.teamwizardry.wizardry.api.spell.attribute.AttributeRegistry; import com.teamwizardry.wizardry.api.spell.attribute.Operation; import com.teamwizardry.wizardry.api.spell.attribute.AttributeRegistry.Attribute; import com.teamwizardry.wizardry.api.spell.ProcessData.DataType; import com.teamwizardry.wizardry.api.spell.SpellDataTypes.BlockSet; import com.teamwizardry.wizardry.api.spell.SpellDataTypes.BlockStateCache; <<<<<<< import java.util.Map.Entry; ======= import java.util.HashSet; import java.util.List; import java.util.Map; >>>>>>> import java.util.Map.Entry; import java.util.HashSet; import java.util.List; import java.util.Map; <<<<<<< ======= @Nonnull private final HashMap<Pair, Object> data = new HashMap<>(); /** * A map holding cast time modifiers */ // TODO: It is mutable. Move to SpellData. @Nonnull private HashMap<Attribute, ArrayListMultimap<Operation, AttributeModifier>> castTimeModifiers = new HashMap<>(); >>>>>>> <<<<<<< ///////////////// public static class DataField<E> { private final String fieldName; private final Class<E> dataType; private DataType lazy_dataTypeProcess = null; // Lazy, because datatypes might not been initialized, if calling before ProcessData.registerAnnotatedDataTypes() ======= //////////////////// public void processCastTimeModifiers(Entity entity, SpellRing spellRing) { List<AttributeModifier> modifiers = SpellModifierRegistry.compileModifiers(entity, spellRing, this); for (AttributeModifier modifier : modifiers) { Attribute attribute = modifier.getAttribute(); Operation operation = modifier.getOperation(); ArrayListMultimap<Operation, AttributeModifier> operationMap = castTimeModifiers.get(attribute); if (operationMap == null) castTimeModifiers.put(attribute, operationMap = ArrayListMultimap.create()); operationMap.put(operation, modifier); } } /** * Get the value of the given attribute after being passed through any cast time modifiers. * * @param attribute The attribute you want. List in {@link AttributeRegistry} for default attributes. * @param value The initial value of the given attribute, given by the compiled value in standard use cases. * @return The {@code double} potency of a modifier. */ public final double getCastTimeValue(Attribute attribute, double value) { ArrayListMultimap<Operation, AttributeModifier> operationMap = castTimeModifiers.get(attribute); if (operationMap == null) return value; for (Operation op : Operation.values()) for (AttributeModifier modifier : operationMap.get(op)) value = modifier.apply(value); return value; } //////////////////// public static class DefaultKeys { public static final Pair<String, Class<NBTTagList>> TAG_LIST = constructPair("list", NBTTagList.class, new ProcessData.Process<NBTTagList, NBTTagList>() { @Nonnull @Override public NBTTagList serialize(@Nullable NBTTagList object) { return object == null ? new NBTTagList() : object; } @Nullable @Override public NBTTagList deserialize(@Nullable World world, @Nonnull NBTTagList object) { return object; } }); public static final Pair<String, Class<NBTTagCompound>> COMPOUND = constructPair("compound", NBTTagCompound.class, new ProcessData.Process<NBTTagCompound, NBTTagCompound>() { @Nonnull @Override public NBTTagCompound serialize(@Nullable NBTTagCompound object) { return object == null ? new NBTTagCompound() : object; } @Override public NBTTagCompound deserialize(@Nullable World world, @Nonnull NBTTagCompound object) { return object; } }); public static final Pair<String, Class<Integer>> MAX_TIME = constructPair("max_time", Integer.class, new ProcessData.Process<NBTTagInt, Integer>() { @Nonnull @Override public NBTTagInt serialize(@Nullable Integer object) { if (object == null) return new NBTTagInt(1); return new NBTTagInt(object); } @Override public Integer deserialize(World world, @Nonnull NBTTagInt object) { return object.getInt(); } }); public static final Pair<String, Class<Entity>> CASTER = constructPair("caster", Entity.class, new ProcessData.Process<NBTTagInt, Entity>() { @Nonnull @Override public NBTTagInt serialize(Entity object) { if (object != null) return new NBTTagInt(object.getEntityId()); return new NBTTagInt(-1); } @Override public Entity deserialize(World world, @Nonnull NBTTagInt object) { return world.getEntityByID(object.getInt()); } }); public static final Pair<String, Class<Float>> YAW = constructPair("yaw", Float.class, new ProcessData.Process<NBTTagFloat, Float>() { @Nonnull @Override public NBTTagFloat serialize(Float object) { return new NBTTagFloat(object); } @Override public Float deserialize(World world, @Nonnull NBTTagFloat object) { return object.getFloat(); } }); public static final Pair<String, Class<Float>> PITCH = constructPair("pitch", Float.class, new ProcessData.Process<NBTTagFloat, Float>() { @Nonnull @Override public NBTTagFloat serialize(Float object) { return new NBTTagFloat(object); } @Override public Float deserialize(World world, @Nonnull NBTTagFloat object) { return object.getFloat(); } }); public static final Pair<String, Class<Vec3d>> LOOK = constructPair("look", Vec3d.class, new ProcessData.Process<NBTTagCompound, Vec3d>() { @Nonnull @Override public NBTTagCompound serialize(Vec3d object) { NBTTagCompound compound = new NBTTagCompound(); compound.setDouble("x", object.x); compound.setDouble("y", object.y); compound.setDouble("z", object.z); return compound; } @Override public Vec3d deserialize(World world, @Nonnull NBTTagCompound object) { double x = object.getDouble("x"); double y = object.getDouble("y"); double z = object.getDouble("z"); return new Vec3d(x, y, z); } }); public static final Pair<String, Class<Vec3d>> ORIGIN = constructPair("origin", Vec3d.class, new ProcessData.Process<NBTTagCompound, Vec3d>() { @Nonnull @Override public NBTTagCompound serialize(Vec3d object) { NBTTagCompound compound = new NBTTagCompound(); compound.setDouble("x", object.x); compound.setDouble("y", object.y); compound.setDouble("z", object.z); return compound; } @Override public Vec3d deserialize(World world, @Nonnull NBTTagCompound object) { double x = object.getDouble("x"); double y = object.getDouble("y"); double z = object.getDouble("z"); return new Vec3d(x, y, z); } }); public static final Pair<String, Class<Entity>> ENTITY_HIT = constructPair("entity_hit", Entity.class, new ProcessData.Process<NBTTagInt, Entity>() { @Nonnull @Override public NBTTagInt serialize(Entity object) { if (object == null) return new NBTTagInt(-1); return new NBTTagInt(object.getEntityId()); } @Override public Entity deserialize(World world, @Nonnull NBTTagInt object) { return world.getEntityByID(object.getInt()); } }); public static final Pair<String, Class<BlockPos>> BLOCK_HIT = constructPair("block_hit", BlockPos.class, new ProcessData.Process<NBTTagLong, BlockPos>() { @Nonnull @Override public NBTTagLong serialize(BlockPos object) { if (object == null) return new NBTTagLong(-1L); return new NBTTagLong(object.toLong()); } @Override public BlockPos deserialize(World world, @Nonnull NBTTagLong object) { return BlockPos.fromLong(object.getLong()); } }); @Nonnull public static final Pair<String, Class<EnumFacing>> FACE_HIT = constructPair("face_hit", EnumFacing.class, new ProcessData.Process<NBTTagString, EnumFacing>() { @Nonnull @Override public NBTTagString serialize(EnumFacing object) { if (object == null) return new NBTTagString("UP"); return new NBTTagString(object.name()); } @Override public EnumFacing deserialize(World world, @Nonnull NBTTagString object) { return EnumFacing.valueOf(object.getString()); } }); @Nonnull public static final Pair<String, Class<IWizardryCapability>> CAPABILITY = constructPair("capability", IWizardryCapability.class, new ProcessData.Process<NBTTagCompound, IWizardryCapability>() { @Nonnull @Override public NBTTagCompound serialize(IWizardryCapability object) { if (object == null) return new NBTTagCompound(); return object.serializeNBT(); } @Override public IWizardryCapability deserialize(World world, @Nonnull NBTTagCompound object) { DefaultWizardryCapability cap = new DefaultWizardryCapability(); cap.deserializeNBT(object); return cap; } }); @Nonnull public static final Pair<String, Class<Vec3d>> TARGET_HIT = constructPair("target_hit", Vec3d.class, new ProcessData.Process<NBTTagCompound, Vec3d>() { @Nonnull @Override public NBTTagCompound serialize(Vec3d object) { if (object == null) return new NBTTagCompound(); NBTTagCompound compound = new NBTTagCompound(); compound.setDouble("x", object.x); compound.setDouble("y", object.y); compound.setDouble("z", object.z); return compound; } @Override public Vec3d deserialize(World world, @Nonnull NBTTagCompound object) { if (!object.hasKey("x") || !object.hasKey("y") || !object.hasKey("z")) return Vec3d.ZERO; double x = object.getDouble("x"); double y = object.getDouble("y"); double z = object.getDouble("z"); return new Vec3d(x, y, z); } }); @Nonnull public static final Pair<String, Class<IBlockState>> BLOCK_STATE = constructPair("block_state", IBlockState.class, new ProcessData.Process<NBTTagCompound, IBlockState>() { @Nonnull @Override public NBTTagCompound serialize(@Nullable IBlockState object) { NBTTagCompound nbtState = new NBTTagCompound(); if (object == null) return nbtState; NBTUtil.writeBlockState(nbtState, object); return nbtState; } @Override public IBlockState deserialize(@Nullable World world, @Nonnull NBTTagCompound object) { return NBTUtil.readBlockState(object); } }); @Nonnull public static final Pair<String, Class<Long>> SEED = constructPair("seed", Long.class, new ProcessData.Process<NBTTagLong, Long>() { @Nonnull @Override public NBTTagLong serialize(@Nullable Long object) { if (object == null) return new NBTTagLong(0); return new NBTTagLong(object); } @Nonnull @Override public Long deserialize(World world, @Nonnull NBTTagLong object) { return object.getLong(); } }); public static final Pair<String, Class<Set<BlockPos>>> BLOCK_SET = constructPair("block_set", Set.class, new ProcessData.Process<NBTTagList, Set<BlockPos>>() { @Nonnull @Override public NBTTagList serialize(@Nullable Set<BlockPos> object) { NBTTagList list = new NBTTagList(); if (object == null) return list; for (BlockPos pos : object) { list.appendTag(new NBTTagLong(pos.toLong())); } return list; } @NotNull @Override public Set<BlockPos> deserialize(@Nullable World world, @Nonnull NBTTagList object) { Set<BlockPos> poses = new HashSet<>(); for (NBTBase base : object) { if (base instanceof NBTTagLong) { poses.add(BlockPos.fromLong(((NBTTagLong) base).getLong())); } } return poses; } }); >>>>>>> //////////////////// public void processCastTimeModifiers(Entity entity, SpellRing spellRing) { List<AttributeModifier> modifiers = SpellModifierRegistry.compileModifiers(entity, spellRing, this); for (AttributeModifier modifier : modifiers) { Attribute attribute = modifier.getAttribute(); Operation operation = modifier.getOperation(); ArrayListMultimap<Operation, AttributeModifier> operationMap = castTimeModifiers.get(attribute); if (operationMap == null) castTimeModifiers.put(attribute, operationMap = ArrayListMultimap.create()); operationMap.put(operation, modifier); } } /** * Get the value of the given attribute after being passed through any cast time modifiers. * * @param attribute The attribute you want. List in {@link AttributeRegistry} for default attributes. * @param value The initial value of the given attribute, given by the compiled value in standard use cases. * @return The {@code double} potency of a modifier. */ public final double getCastTimeValue(Attribute attribute, double value) { ArrayListMultimap<Operation, AttributeModifier> operationMap = castTimeModifiers.get(attribute); if (operationMap == null) return value; for (Operation op : Operation.values()) for (AttributeModifier modifier : operationMap.get(op)) value = modifier.apply(value); return value; } //////////////////// public static class DataField<E> { private final String fieldName; private final Class<E> dataType; private DataType lazy_dataTypeProcess = null; // Lazy, because datatypes might not been initialized, if calling before ProcessData.registerAnnotatedDataTypes()
<<<<<<< abstract void setZoom(@Zoom int zoom); abstract void setTextDetector(Detector<TextBlock> detector); ======= >>>>>>> abstract void setZoom(@Zoom int zoom); abstract void setTextDetector(Detector<TextBlock> detector);
<<<<<<< String sb1 = ""; String sb2 = ""; for (int i = 0; i < no_players; i++) { sb1 += "Player" + i + "-" + avatars[i].getWinState().key() + ", "; sb2 += "Player" + i + "-" + "Score:" + avatars[i].getScore() + ", "; } System.out.println("Result (1->win; 0->lose):" + sb1 + sb2 + "timesteps:" + this.getGameTick()); ======= //System.out.println("Result (1->win; 0->lose):"+ winner.key() + ", Score:" + score + ", timesteps:" + this.getGameTick()); >>>>>>> String sb1 = ""; String sb2 = ""; for (int i = 0; i < no_players; i++) { sb1 += "Player" + i + "-" + avatars[i].getWinState().key() + ", "; sb2 += "Player" + i + "-" + "Score:" + avatars[i].getScore() + ", "; } System.out.println("Result (1->win; 0->lose):" + sb1 + sb2 + "timesteps:" + this.getGameTick()); //System.out.println("Result (1->win; 0->lose):"+ winner.key() + ", Score:" + score + ", timesteps:" + this.getGameTick());
<<<<<<< import core.termination.Termination; import ontology.avatar.MovingAvatar; ======= import core.competition.CompetitionParameters; import core.vgdl.VGDLViewer; >>>>>>> import core.termination.Termination; import ontology.avatar.MovingAvatar; import core.competition.CompetitionParameters; import core.vgdl.VGDLViewer; <<<<<<< // Game variables public int[] spriteOrder; public boolean[] singletons; public Integer[][] iSubTypesArray; public HashMap<Character, ArrayList<String>> charMapping; public ArrayList<Termination> terminations; public int[] resources_limits; public Color[] resources_colors; public boolean is_stochastic; public int num_sprites; public int nextSpriteID; // State Observation variables ======= public byte[] imageArray; >>>>>>> // Game variables public int[] spriteOrder; public boolean[] singletons; public Integer[][] iSubTypesArray; public HashMap<Character, ArrayList<String>> charMapping; public ArrayList<Termination> terminations; public int[] resources_limits; public Color[] resources_colors; public boolean is_stochastic; public int num_sprites; public int nextSpriteID; // State Observation variables public byte[] imageArray; <<<<<<< public SerializableStateObservation(StateObservation s, Game g) ======= public SerializableStateObservation(StateObservation s, Boolean both){ try { if (!both) { // Fill in the persistent variables (Score, tick) buildGameData(s); // Create the image bytearray imageArray = imageToByteArray(); } else { // Fill in the persistent variables (Score, tick) buildGameData(s); // Create the image bytearray imageArray = imageToByteArray(); // Fill in the simple data variables buildDataVariables(s); // Fill in the data array lists buildDataArraylists(s); } }catch(IOException e){ System.out.println("Transforming image to byte array failed. Original error: " + e); } } public SerializableStateObservation(StateObservation s) >>>>>>> public SerializableStateObservation(StateObservation s, Game g) public SerializableStateObservation(StateObservation s, Boolean both){ try { if (!both) { // Fill in the persistent variables (Score, tick) buildGameData(s); // Create the image bytearray imageArray = imageToByteArray(); } else { // Fill in the persistent variables (Score, tick) buildGameData(s); // Create the image bytearray imageArray = imageToByteArray(); // Fill in the simple data variables buildDataVariables(s); // Fill in the data array lists buildDataArraylists(s); } }catch(IOException e){ System.out.println("Transforming image to byte array failed. Original error: " + e); } } public SerializableStateObservation(StateObservation s)
<<<<<<< Vector2d move = Utils.processMovementActionKeys(stateObs.getKeyHandler(getPlayerID()).getMask()); boolean useOn = Utils.processUseKey(stateObs.getKeyHandler(getPlayerID()).getMask()); ======= Direction move = Utils.processMovementActionKeys(Game.ki.getMask()); boolean useOn = Utils.processUseKey(Game.ki.getMask()); >>>>>>> Direction move = Utils.processMovementActionKeys(stateObs.getKeyHandler(getPlayerID()).getMask()); boolean useOn = Utils.processUseKey(stateObs.getKeyHandler(getPlayerID()).getMask());
<<<<<<< // Type of client to test against (Python/Java) String clientType = "java"; //"python"; //Available controllers: ======= /** Find the write shell to build and run client */ >>>>>>> // Type of client to test against (Python/Java) String clientType = "java"; //"python"; //Available controllers: /** Find the write shell to build and run client */
<<<<<<< String games[] = new String[]{}; ======= String generateLevelPath = "examples/generatedLevels/"; >>>>>>> String games[] = new String[]{}; String generateLevelPath = "examples/generatedLevels/"; <<<<<<< //Training Set 5 (Validation CIG 2015, Test GECCO 2015) //String games[] = new String[]{ "solarfox", "defender", "enemycitadel", "crossfire", "lasers", // "sheriff", "chopper", "superman", "waitforbreakfast", "cakybaky"}; //Training Set 6 (Validation CEEC 2015) games = new String[]{"lasers2", "hungrybirds" ,"cookmepasta", "factorymanager", "raceBet2", "intersection", "blacksmoke", "iceandfire", "gymkhana", "tercio"}; ======= //CIG 2014 TEST SET / GECCO 2015 VALIDATION SET String games[] = new String[]{"aliens", "boulderdash", "butterflies", "chase", "frogs", "missileCommand", "portals", "sokoban", "survivezombies", "zelda"}; >>>>>>> //Training Set 5 (Validation CIG 2015, Test GECCO 2015) //games = new String[]{ "solarfox", "defender", "enemycitadel", "crossfire", "lasers", // "sheriff", "chopper", "superman", "waitforbreakfast", "cakybaky"}; //Training Set 6 (Validation CEEC 2015) //games = new String[]{"lasers2", "hungrybirds" ,"cookmepasta", "factorymanager", "raceBet2", // "intersection", "blacksmoke", "iceandfire", "gymkhana", "tercio"};
<<<<<<< Vector2d action2D = Utils.processMovementActionKeys(getKeyHandler().getMask()); ======= Direction action2D = Utils.processMovementActionKeys(game.ki.getMask()); >>>>>>> Direction action2D = Utils.processMovementActionKeys(getKeyHandler().getMask());
<<<<<<< ======= /** * Naming strategy similar to {@link KebabCaseStrategy}, but instead of hyphens * as separators, uses dots. Naming convention widely used as configuration properties name. * * @since 2.10 */ public static class LowerDotCaseStrategy extends PropertyNamingStrategyBase { /* @Override public String translate(String input){ return translateLowerCaseWithSeparator(input, '.'); } */ @Override public String translate(String input) { return input.toLowerCase(); } } /* /********************************************************** /* Deprecated variants, aliases /********************************************************** */ /** * @deprecated Since 2.7 use {@link #SNAKE_CASE} instead; */ @Deprecated // since 2.7 public static final PropertyNamingStrategy CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES = SNAKE_CASE; /** * @deprecated Since 2.7 use {@link #UPPER_CAMEL_CASE} instead; */ @Deprecated // since 2.7 public static final PropertyNamingStrategy PASCAL_CASE_TO_CAMEL_CASE = UPPER_CAMEL_CASE; /** * @deprecated In 2.7 use {@link SnakeCaseStrategy} instead */ @Deprecated public static class LowerCaseWithUnderscoresStrategy extends SnakeCaseStrategy {} /** * @deprecated In 2.7 use {@link UpperCamelCaseStrategy} instead */ @Deprecated public static class PascalCaseStrategy extends UpperCamelCaseStrategy {} >>>>>>> /** * Naming strategy similar to {@link KebabCaseStrategy}, but instead of hyphens * as separators, uses dots. Naming convention widely used as configuration properties name. */ public static class LowerDotCaseStrategy extends PropertyNamingStrategyBase { /* @Override public String translate(String input){ return translateLowerCaseWithSeparator(input, '.'); } */ @Override public String translate(String input) { return input.toLowerCase(); } }
<<<<<<< import org.n52.shetland.ogc.sensorML.SensorML; ======= import org.n52.shetland.ogc.sos.Sos2Constants; import org.n52.shetland.ogc.sos.SosConstants; import org.n52.shetland.ogc.sos.SosProcedureDescription; import org.n52.shetland.ogc.sos.request.InsertResultRequest; import org.n52.shetland.ogc.sos.response.InsertResultResponse; >>>>>>> import org.n52.shetland.ogc.sensorML.SensorML; import org.n52.shetland.ogc.sos.Sos2Constants; import org.n52.shetland.ogc.sos.SosConstants; import org.n52.shetland.ogc.sos.SosProcedureDescription; import org.n52.shetland.ogc.sos.request.InsertResultRequest; import org.n52.shetland.ogc.sos.response.InsertResultResponse;
<<<<<<< parseParameterSet(n.children); ======= if(n.content.identifier.equals("SpriteSet")) { try{ parseSpriteSet(n.children); } catch(Exception e) { logger.addMessage(new Message(1, "Sprite Set Error: " + e.toString())); } }else if(n.content.identifier.equals("InteractionSet")) { try{ parseInteractionSet(n.children); } catch(Exception e) { logger.addMessage(new Message(1, "Interaction Set Error: " + e.getMessage())); } }else if(n.content.identifier.equals("LevelMapping")) { try{ parseLevelMapping(n.children); } catch(Exception e) { logger.addMessage(new Message(1, "Level Mapping Error: " + e.toString())); } }else if(n.content.identifier.equals("TerminationSet")) { try{ parseTerminationSet(n.children); } catch(Exception e) { logger.addMessage(new Message(1, "Termination Set Error: " + e.toString())); } } >>>>>>> parseParameterSet(n.children); if(n.content.identifier.equals("SpriteSet")) { try{ parseSpriteSet(n.children); } catch(Exception e) { logger.addMessage(new Message(1, "Sprite Set Error: " + e.toString())); } }else if(n.content.identifier.equals("InteractionSet")) { try{ parseInteractionSet(n.children); } catch(Exception e) { logger.addMessage(new Message(1, "Interaction Set Error: " + e.getMessage())); } }else if(n.content.identifier.equals("LevelMapping")) { try{ parseLevelMapping(n.children); } catch(Exception e) { logger.addMessage(new Message(1, "Level Mapping Error: " + e.toString())); } }else if(n.content.identifier.equals("TerminationSet")) { try{ parseTerminationSet(n.children); } catch(Exception e) { logger.addMessage(new Message(1, "Termination Set Error: " + e.toString())); } } <<<<<<< ======= //TODO if there is anything other than these, "Error, [line number] 'Undefined VGDL Block'" //TODO if we find that not having an interaction or termination set causes problems, make it an error return game; >>>>>>> <<<<<<< public void parseInteractionTermination(Game currentGame, String[] rules, String[] terminations){ this.game = currentGame; Node rulesNode = indentTreeParser(rules); Node terNode = indentTreeParser(terminations); parseInteractionSet(rulesNode.children); parseTerminationSet(terNode.children); ======= public void parseInteractionTermination(Game currentGame, String[] rules, String[] terminations) throws Exception{ this.game = currentGame; Node rulesNode = indentTreeParser(rules); Node terNode = indentTreeParser(terminations); try{ parseInteractionSet(rulesNode.children); parseTerminationSet(terNode.children); } catch(Exception e) { logger.addMessage(new Message(1, "[PARSE ERROR]")); } >>>>>>> public void parseInteractionTermination(Game currentGame, String[] rules, String[] terminations){ this.game = currentGame; Node rulesNode = indentTreeParser(rules); Node terNode = indentTreeParser(terminations); try{ parseInteractionSet(rulesNode.children); parseTerminationSet(terNode.children); } catch(Exception e) { logger.addMessage(new Message(1, "[PARSE ERROR]")); }
<<<<<<< public Effect createEffect(Game game, InteractionContent content) ======= public Effect createEffect(InteractionContent content) throws Exception >>>>>>> public Effect createEffect(Game game, InteractionContent content) throws Exception <<<<<<< public Termination createTermination(Game game, TerminationContent content) ======= public Termination createTermination(TerminationContent content) throws Exception >>>>>>> public Termination createTermination(Game game, TerminationContent content) throws Exception
<<<<<<< return Guice.createInjector(Modules.override(new GeogitModule()).with( new MongoStorageModule(), new MetricsModule())); ======= return Guice.createInjector(Modules.override(new GeogitModule(), new CachingModule()).with( new JEStorageModule(), new MetricsModule())); >>>>>>> return Guice.createInjector(Modules.override(new GeogitModule(), new CachingModule()).with( new MongoStorageModule(), new MetricsModule()));
<<<<<<< } else if ("revertfeature".equalsIgnoreCase(commandName)) { command = buildRevertFeature(options); } else if ("blame".equalsIgnoreCase(commandName)) { command = buildBlame(options); ======= } else if ("rebuildgraph".equalsIgnoreCase(commandName)) { command = buildRebuildGraph(options); >>>>>>> } else if ("revertfeature".equalsIgnoreCase(commandName)) { command = buildRevertFeature(options); } else if ("rebuildgraph".equalsIgnoreCase(commandName)) { command = buildRebuildGraph(options); } else if ("blame".equalsIgnoreCase(commandName)) { command = buildBlame(options); <<<<<<< static RevertFeatureWebOp buildRevertFeature(ParameterSet options) { RevertFeatureWebOp command = new RevertFeatureWebOp(); command.setAuthorName(options.getFirstValue("authorName", null)); command.setAuthorEmail(options.getFirstValue("authorEmail", null)); command.setCommitMessage(options.getFirstValue("commitMessage", null)); command.setMergeMessage(options.getFirstValue("mergeMessage", null)); command.setNewCommitId(options.getFirstValue("newCommitId", null)); command.setOldCommitId(options.getFirstValue("oldCommitId", null)); command.setPath(options.getFirstValue("path", null)); return command; } static BlameWebOp buildBlame(ParameterSet options) { BlameWebOp command = new BlameWebOp(); command.setCommit(options.getFirstValue("commit", null)); command.setPath(options.getFirstValue("path", null)); return command; } ======= static RebuildGraphWebOp buildRebuildGraph(ParameterSet options) { RebuildGraphWebOp command = new RebuildGraphWebOp(); command.setQuiet(Boolean.valueOf(options.getFirstValue("quiet", "false"))); return command; } >>>>>>> static RebuildGraphWebOp buildRebuildGraph(ParameterSet options) { RebuildGraphWebOp command = new RebuildGraphWebOp(); command.setQuiet(Boolean.valueOf(options.getFirstValue("quiet", "false"))); return command; } static RevertFeatureWebOp buildRevertFeature(ParameterSet options) { RevertFeatureWebOp command = new RevertFeatureWebOp(); command.setAuthorName(options.getFirstValue("authorName", null)); command.setAuthorEmail(options.getFirstValue("authorEmail", null)); command.setCommitMessage(options.getFirstValue("commitMessage", null)); command.setMergeMessage(options.getFirstValue("mergeMessage", null)); command.setNewCommitId(options.getFirstValue("newCommitId", null)); command.setOldCommitId(options.getFirstValue("oldCommitId", null)); command.setPath(options.getFirstValue("path", null)); return command; } static BlameWebOp buildBlame(ParameterSet options) { BlameWebOp command = new BlameWebOp(); command.setCommit(options.getFirstValue("commit", null)); command.setPath(options.getFirstValue("path", null)); return command; }
<<<<<<< import org.geogit.api.porcelain.ConfigOp.ConfigAction; import org.geogit.api.porcelain.ConfigOp.ConfigScope; ======= import org.geogit.di.CanRunDuringConflict; >>>>>>> import org.geogit.api.porcelain.ConfigOp.ConfigAction; import org.geogit.api.porcelain.ConfigOp.ConfigScope; import org.geogit.di.CanRunDuringConflict; <<<<<<< public class CheckoutOp extends AbstractGeoGitOp<CheckoutResult> { ======= @CanRunDuringConflict public class CheckoutOp extends AbstractGeoGitOp<ObjectId> { >>>>>>> @CanRunDuringConflict public class CheckoutOp extends AbstractGeoGitOp<CheckoutResult> { <<<<<<< CheckoutResult result = new CheckoutResult(); ======= List<Conflict> conflicts = getIndex().getDatabase().getConflicts(null); >>>>>>> CheckoutResult result = new CheckoutResult(); List<Conflict> conflicts = getIndex().getDatabase().getConflicts(null); <<<<<<< result.setResult(CheckoutResult.Results.UPDATE_OBJECTS); Optional<RevTree> tree = Optional.absent(); ======= List<String> unmerged = lookForUnmerged(conflicts, paths); if (!unmerged.isEmpty()) { if (!(force || ours || theirs)) { StringBuilder msg = new StringBuilder(); for (String path : unmerged) { msg.append("error: path " + path + " is unmerged.\n"); } throw new CheckoutException(msg.toString(), StatusCode.UNMERGED_PATHS); } } Optional<RevTree> tree; >>>>>>> result.setResult(CheckoutResult.Results.UPDATE_OBJECTS); Optional<RevTree> tree = Optional.absent(); List<String> unmerged = lookForUnmerged(conflicts, paths); if (!unmerged.isEmpty()) { if (!(force || ours || theirs)) { StringBuilder msg = new StringBuilder(); for (String path : unmerged) { msg.append("error: path " + path + " is unmerged.\n"); } throw new CheckoutException(msg.toString(), StatusCode.UNMERGED_PATHS); } } <<<<<<< return result; ======= Optional<Ref> ref = command(RefParse.class).setName(Ref.MERGE_HEAD).call(); if (ref.isPresent()) { command(UpdateRef.class).setName(Ref.MERGE_HEAD).setDelete(true).call(); } return treeId; >>>>>>> Optional<Ref> ref = command(RefParse.class).setName(Ref.MERGE_HEAD).call(); if (ref.isPresent()) { command(UpdateRef.class).setName(Ref.MERGE_HEAD).setDelete(true).call(); } return result;
<<<<<<< import java.io.IOException; import java.io.Serializable; ======= >>>>>>> import java.io.IOException; import java.io.Serializable; <<<<<<< import org.eclipse.imp.pdb.facts.io.SerializableValue; ======= >>>>>>> <<<<<<< import org.eclipse.imp.pdb.facts.type.TypeStore; import org.rascalmpl.interpreter.types.RascalType; ======= >>>>>>> import org.eclipse.imp.pdb.facts.type.TypeStore;
<<<<<<< * States of {@link com.fasterxml.jackson.core.StreamReadFeature}s to enable/disable. ======= * @since 2.12 */ protected final CoercionConfigs _coercionConfigs; /** * @since 2.12 */ protected final ConstructorDetector _ctorDetector; /* /********************************************************** /* Deserialization features /********************************************************** >>>>>>> * States of {@link com.fasterxml.jackson.core.StreamReadFeature}s to enable/disable. <<<<<<< ======= public DeserializationConfig(BaseSettings base, SubtypeResolver str, SimpleMixInResolver mixins, RootNameLookup rootNames, ConfigOverrides configOverrides, CoercionConfigs coercionConfigs) { super(base, str, mixins, rootNames, configOverrides); _deserFeatures = DESER_FEATURE_DEFAULTS; _problemHandlers = null; _nodeFactory = JsonNodeFactory.instance; _ctorDetector = null; _coercionConfigs = coercionConfigs; _parserFeatures = 0; _parserFeaturesToChange = 0; _formatReadFeatures = 0; _formatReadFeaturesToChange = 0; } >>>>>>> <<<<<<< _streamReadFeatures = src._streamReadFeatures; ======= _problemHandlers = problemHandlers; _nodeFactory = src._nodeFactory; _coercionConfigs = src._coercionConfigs; _ctorDetector = src._ctorDetector; _parserFeatures = src._parserFeatures; _parserFeaturesToChange = src._parserFeaturesToChange; >>>>>>> _streamReadFeatures = src._streamReadFeatures; <<<<<<< /********************************************************************** /* Abstract type mapping /********************************************************************** ======= /********************************************************** /* Other configuration /********************************************************** */ /** * Method for getting head of the problem handler chain. May be null, * if no handlers have been added. */ public LinkedNode<DeserializationProblemHandler> getProblemHandlers() { return _problemHandlers; } public final JsonNodeFactory getNodeFactory() { return _nodeFactory; } /** * @since 2.12 */ public ConstructorDetector getConstructorDetector() { if (_ctorDetector == null) { return ConstructorDetector.DEFAULT; } return _ctorDetector; } /* /********************************************************** /* Introspection methods /********************************************************** >>>>>>> /********************************************************************** /* Abstract type mapping /**********************************************************************
<<<<<<< <V extends IValue> Result<IBool> elementOf(ElementResult<V> elementResult) { ======= protected <U extends IValue, V extends IValue> Result<U> elementOf(ElementResult<V> elementResult) { >>>>>>> protected <V extends IValue> Result<IBool> elementOf(ElementResult<V> elementResult) { <<<<<<< <V extends IValue> Result<IBool> notElementOf(ElementResult<V> elementResult) { ======= protected <U extends IValue, V extends IValue> Result<U> notElementOf(ElementResult<V> elementResult) { >>>>>>> protected <V extends IValue> Result<IBool> notElementOf(ElementResult<V> elementResult) { <<<<<<< ======= @Override protected <U extends IValue> Result<U> compareListRelation(ListRelationResult that) { // Note reversed args IList left = that.getValue(); IList right = this.getValue(); int compare = Integer.valueOf(left.length()).compareTo(Integer.valueOf(right.length())); // TODO: think about what <= on lists should mean if (compare != 0) { return makeIntegerResult(compare); } for (int i = 0; i < left.length(); i++) { compare = compareIValues(left.get(i), right.get(i), ctx); if (compare != 0) { return makeIntegerResult(compare); } } return makeIntegerResult(0); } @Override protected <U extends IValue> Result<U> joinListRelation(ListRelationResult that) { // Note the reverse of arguments, we need "that join this" int arity1 = that.getValue().arity(); Type eltType = getType().getElementType(); Type tupleType = that.getType().getElementType(); Type fieldTypes[] = new Type[arity1 + 1]; for (int i = 0; i < arity1; i++) { fieldTypes[i] = tupleType.getFieldType(i); } fieldTypes[arity1] = eltType; Type resultTupleType = getTypeFactory().tupleType(fieldTypes); IListWriter writer = getValueFactory().listWriter(resultTupleType); IValue fieldValues[] = new IValue[arity1 + 1]; for (IValue relValue: that.getValue()) { for (IValue setValue: this.getValue()) { for (int i = 0; i < arity1; i++) { fieldValues[i] = ((ITuple)relValue).get(i); } fieldValues[arity1] = setValue; writer.append(getValueFactory().tuple(fieldValues)); } } Type resultType = getTypeFactory().lrelTypeFromTuple(resultTupleType); return makeResult(resultType, writer.done(), ctx); } @Override protected <U extends IValue> Result<U> joinList(ListResult that) { // Note the reverse of arguments, we need "that join this" // join between sets degenerates to product Type tupleType = getTypeFactory().tupleType(that.getType().getElementType(), getType().getElementType()); return makeResult(getTypeFactory().lrelTypeFromTuple(tupleType), that.getValue().product(getValue()), ctx); } >>>>>>> @Override protected <U extends IValue> Result<U> joinListRelation(ListRelationResult that) { // Note the reverse of arguments, we need "that join this" int arity1 = that.getValue().arity(); Type eltType = getType().getElementType(); Type tupleType = that.getType().getElementType(); Type fieldTypes[] = new Type[arity1 + 1]; for (int i = 0; i < arity1; i++) { fieldTypes[i] = tupleType.getFieldType(i); } fieldTypes[arity1] = eltType; Type resultTupleType = getTypeFactory().tupleType(fieldTypes); IListWriter writer = getValueFactory().listWriter(resultTupleType); IValue fieldValues[] = new IValue[arity1 + 1]; for (IValue relValue: that.getValue()) { for (IValue setValue: this.getValue()) { for (int i = 0; i < arity1; i++) { fieldValues[i] = ((ITuple)relValue).get(i); } fieldValues[arity1] = setValue; writer.append(getValueFactory().tuple(fieldValues)); } } Type resultType = getTypeFactory().lrelTypeFromTuple(resultTupleType); return makeResult(resultType, writer.done(), ctx); } @Override protected <U extends IValue> Result<U> joinList(ListResult that) { // Note the reverse of arguments, we need "that join this" // join between sets degenerates to product Type tupleType = getTypeFactory().tupleType(that.getType().getElementType(), getType().getElementType()); return makeResult(getTypeFactory().lrelTypeFromTuple(tupleType), that.getValue().product(getValue()), ctx); }
<<<<<<< ======= import org.rascalmpl.ast.KeywordFormal; import org.rascalmpl.ast.NullASTVisitor; import org.rascalmpl.ast.Parameters; >>>>>>> import org.rascalmpl.ast.NullASTVisitor; <<<<<<< protected final Map<String, String> tags; ======= protected final Map<String, IValue> tags; protected final Type[] keywordParameterTypes; >>>>>>> protected final Map<String, IValue> tags; protected final Type[] keywordParameterTypes;
<<<<<<< import java.nio.file.Paths; import java.util.Map; ======= >>>>>>> import java.util.Map;
<<<<<<< import org.rascalmpl.values.uptr.RascalValueFactory; ======= import org.rascalmpl.values.ValueFactoryFactory; import org.rascalmpl.values.uptr.Factory; >>>>>>> import org.rascalmpl.values.uptr.RascalValueFactory; import org.rascalmpl.values.ValueFactoryFactory; <<<<<<< TypeStore typeStore = new TypeStore(RascalValueFactory.getStore()); SerializableRascalValue.initSerialization(typeStore); Function.initSerialization(vf, typeStore); CodeBlock.initSerialization(vf, typeStore); ======= TypeStore typeStore = new TypeStore(Factory.getStore()); >>>>>>> TypeStore typeStore = new TypeStore(RascalValueFactory.getStore()); <<<<<<< TypeStore typeStore = new TypeStore(RascalValueFactory.getStore()); typeserializer = new TypeSerializer(typeStore); SerializableRascalValue.initSerialization(typeStore); Function.initSerialization(vf, typeStore); CodeBlock.initSerialization(vf, typeStore); ======= vf = ValueFactoryFactory.getValueFactory(); TypeStore typeStore = new TypeStore(Factory.getStore()); >>>>>>> vf = ValueFactoryFactory.getValueFactory(); TypeStore typeStore = new TypeStore(RascalValueFactory.getStore());
<<<<<<< .enableDefaultTyping(new SimpleNameBasedValidator()) ======= .activateDefaultTyping(new SimpleClassBasedValidator()) >>>>>>> .activateDefaultTyping(new SimpleNameBasedValidator())
<<<<<<< mv.visitFieldInsn(GETFIELD, FRAME_NAME, "function", Type.getDescriptor(Function.class)); mv.visitFieldInsn(GETFIELD, FUNCTION_NAME, "typeConstantStore", Type.getDescriptor(io.usethesource.vallang.type.Type[].class)); ======= mv.visitFieldInsn(GETFIELD, FRAME_NAME, "function", getDescriptor(Function.class)); mv.visitFieldInsn(GETFIELD, FUNCTION_NAME, "typeConstantStore", getDescriptor(org.rascalmpl.value.type.Type[].class)); >>>>>>> mv.visitFieldInsn(GETFIELD, FRAME_NAME, "function", getDescriptor(Function.class)); mv.visitFieldInsn(GETFIELD, FUNCTION_NAME, "typeConstantStore", getDescriptor(io.usethesource.vallang.type.Type[].class)); <<<<<<< mv.visitTypeInsn(CHECKCAST, getInternalName(io.usethesource.vallang.type.Type.class)); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", Type.getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); ======= mv.visitTypeInsn(CHECKCAST, getInternalName(org.rascalmpl.value.type.Type.class)); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(org.rascalmpl.value.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); >>>>>>> mv.visitTypeInsn(CHECKCAST, getInternalName(io.usethesource.vallang.type.Type.class)); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); <<<<<<< mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValue.class), "getType", Type.getMethodDescriptor(TYPE_TYPE), true); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), predicate, Type.getMethodDescriptor(BOOLEAN_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", Type.getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); ======= mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValue.class), "getType", getMethodDescriptor(TYPE_TYPE), true); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(org.rascalmpl.value.type.Type.class), predicate, getMethodDescriptor(BOOLEAN_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); >>>>>>> mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValue.class), "getType", getMethodDescriptor(TYPE_TYPE), true); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), predicate, getMethodDescriptor(BOOLEAN_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); <<<<<<< mv.visitTypeInsn(CHECKCAST, getInternalName(io.usethesource.vallang.type.Type.class)); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", Type.getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", Type.getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); ======= mv.visitTypeInsn(CHECKCAST, getInternalName(org.rascalmpl.value.type.Type.class)); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(org.rascalmpl.value.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); >>>>>>> mv.visitTypeInsn(CHECKCAST, getInternalName(io.usethesource.vallang.type.Type.class)); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); <<<<<<< mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", Type.getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", Type.getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); ======= mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(org.rascalmpl.value.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); >>>>>>> mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); <<<<<<< mv.visitTypeInsn(CHECKCAST, getInternalName(io.usethesource.vallang.type.Type.class)); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", Type.getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", Type.getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); ======= mv.visitTypeInsn(CHECKCAST, getInternalName(org.rascalmpl.value.type.Type.class)); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(org.rascalmpl.value.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); >>>>>>> mv.visitTypeInsn(CHECKCAST, getInternalName(io.usethesource.vallang.type.Type.class)); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); <<<<<<< mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValue.class), "getType", Type.getMethodDescriptor(TYPE_TYPE), true); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", Type.getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", Type.getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); ======= mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValue.class), "getType", getMethodDescriptor(TYPE_TYPE), true); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(org.rascalmpl.value.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); >>>>>>> mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValue.class), "getType", getMethodDescriptor(TYPE_TYPE), true); mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE), false); mv.visitMethodInsn(INVOKEINTERFACE, getInternalName(IValueFactory.class), "bool", getMethodDescriptor(getType(IBool.class), BOOLEAN_TYPE), true); <<<<<<< mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", Type.getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE),false); ======= mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(org.rascalmpl.value.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE),false); >>>>>>> mv.visitMethodInsn(INVOKEVIRTUAL, getInternalName(io.usethesource.vallang.type.Type.class), "isSubtypeOf", getMethodDescriptor(BOOLEAN_TYPE, TYPE_TYPE),false);
<<<<<<< import android.widget.ImageView; import android.widget.LinearLayout; ======= import android.widget.ImageView; >>>>>>> import android.widget.ImageView; import android.widget.LinearLayout; <<<<<<< if(!quizzes.isEmpty()) { mLLEmptyFilterResultContainer.setVisibility(View.GONE); } ======= mQuizRecyclerView.setVisibility(View.VISIBLE); mEmptyStateTextView.setVisibility(View.GONE); >>>>>>> if(!quizzes.isEmpty()) { mLLEmptyFilterResultContainer.setVisibility(View.GONE); } mQuizRecyclerView.setVisibility(View.VISIBLE); mEmptyStateTextView.setVisibility(View.GONE);
<<<<<<< void navigateToQuizDiscussion(String quizId); void navigateToQuizDetails(String quizId); ======= void handleEmptyView(String selectedFilter); >>>>>>> void navigateToQuizDiscussion(String quizId); void navigateToQuizDetails(String quizId); void handleEmptyView(String selectedFilter);
<<<<<<< ======= import pcgen.cdom.base.Ungranted; import pcgen.cdom.enumeration.ListKey; >>>>>>> import pcgen.cdom.base.Ungranted;
<<<<<<< public void push(@Nullable Fragment fragment, @Nullable FragNavTransactionOptions transactionOptions) { ======= public void pushFragment(@Nullable Fragment fragment) { >>>>>>> public void pushFragment(@Nullable Fragment fragment, @Nullable FragNavTransactionOptions transactionOptions) { <<<<<<< * Push a fragment onto the current stack * * @param fragment The fragment that is to be pushed */ public void push(@Nullable Fragment fragment) { push(fragment, null); } /** ======= * @deprecated use pushFragment instead. * @param fragment The fragment that is to be pushed * */ @Deprecated public void push(@Nullable Fragment fragment){ pushFragment(fragment); } /** >>>>>>> * Push a fragment onto the current stack * * @param fragment The fragment that is to be pushed */ public void pushFragment(@Nullable Fragment fragment) { pushFragment(fragment, null); } /** <<<<<<< /** * Replace the current fragment * * @param fragment the fragment to be shown instead */ public void replace(@NonNull Fragment fragment) { replace(fragment, null); } ======= /** * @deprecated use replaceFragment(Fragment) instead. * @param fragment The fragment to use in place of the current one */ public void replace(@NonNull Fragment fragment){ replaceFragment(fragment); } >>>>>>> /** * Replace the current fragment * * @param fragment the fragment to be shown instead */ public void replaceFragment(@NonNull Fragment fragment) { replaceFragment(fragment, null); } <<<<<<< * Get the current stack that is being displayed * ======= * Get a copy of the current stack that is being displayed * >>>>>>> * Get a copy of the current stack that is being displayed * <<<<<<< * @return If you are able to pop the current stack. If false, you are at the bottom of the stack * (Consider using replace if you need to change the root fragment for some reason) * * @deprecated use {@link #isRootFragment()} instead. Changed for naming reasons ======= * @return If you are able to popFragment the current stack. If false, you are at the bottom of the stack * (Consider using replaceFragment if you need to change the root fragment for some reason) * * @deprecated use {@link #isRootFragment()} instead. Changed for naming reasons >>>>>>> * @return If you are able to popFragment the current stack. If false, you are at the bottom of the stack * (Consider using replaceFragment if you need to change the root fragment for some reason) * * @deprecated use {@link #isRootFragment()} instead. Changed for naming reasons <<<<<<< * @return If true, you are at the bottom of the stack * (Consider using replace if you need to change the root fragment for some reason) * else you can pop as needed as your are not at the root * * @deprecated use {@link #isRootFragment()} instead. ======= * @return If true, you are at the bottom of the stack * (Consider using replaceFragment if you need to change the root fragment for some reason) * else you can popFragment as needed as your are not at the root * * @deprecated use {@link #isRootFragment()} instead. >>>>>>> * @return If true, you are at the bottom of the stack * (Consider using replaceFragment if you need to change the root fragment for some reason) * else you can popFragment as needed as your are not at the root * * @deprecated use {@link #isRootFragment()} instead.
<<<<<<< @Test public void filestat() throws Throwable { ======= @Test public void filestat() throws Throwable { >>>>>>> @Test public void filestat() throws Throwable { <<<<<<< FileStat stat = posix.stat(f.getAbsolutePath()); assertNotNull("posix.stat failed", stat); assertEquals(size, stat.st_size()); //assertNotEquals(stat.mtime(), stat.ctime()); stat = posix.allocateStat(); ======= FileStat st = posix.stat(f.getAbsolutePath()); assertNotNull("posix.stat failed", st); FileStat stat = posix.allocateStat(); >>>>>>> FileStat stat = posix.stat(f.getAbsolutePath()); assertNotNull("posix.stat failed", stat); assertEquals(size, stat.st_size()); //assertNotEquals(stat.mtime(), stat.ctime()); stat = posix.allocateStat(); <<<<<<< @Test public void filestatDescriptor() throws Throwable { File f = File.createTempFile("stat", null); try { FileInputStream fis = new FileInputStream(f); FileStat stat = posix.allocateStat(); int result = posix.fstat(fis.getFD(), stat); assertEquals(0, result); assertEquals(0, stat.st_size()); } finally { f.delete(); } } ======= >>>>>>> @Test public void filestatDescriptor() throws Throwable { File f = File.createTempFile("stat", null); try { FileInputStream fis = new FileInputStream(f); FileStat stat = posix.allocateStat(); int result = posix.fstat(fis.getFD(), stat); assertEquals(0, result); assertEquals(0, stat.st_size()); } finally { f.delete(); } } <<<<<<< // FIXME: I could guarantee this does not exist but this was very very quick :) private static final String NON_EXISTENT_FILENAME = "skdjlfklfsdjk"; @Test public void filestatFailed() throws Throwable { FileStat stat = null; // A little wonky without adding a new posixhandler but we are using dummy so this is ok for now // the default handler raises on a problem in stat so we are only verifying this at the moment. try { stat = posix.stat(NON_EXISTENT_FILENAME); } catch (UnsupportedOperationException e) {} assertTrue(stat == null); } @Test public void structStatSize() throws Throwable { ======= @Test public void fileStatNanoTime() throws Throwable { // Currently only linux file stat support nano time resolution jnr.ffi.Platform nativePlatform = jnr.ffi.Platform.getNativePlatform(); if (nativePlatform.getOS() == jnr.ffi.Platform.OS.LINUX) { File f = File.createTempFile("stat", null); try { FileStat st = posix.stat(f.getAbsolutePath()); assertNotNull("posix.stat failed", st); FileStat stat = posix.allocateStat(); int result = posix.stat(f.getAbsolutePath(), stat); assertNotNull("posix.stat failed", st); assertEquals(0, result); if (Platform.IS_32_BIT) { LinuxFileStat32 fstat32 = (LinuxFileStat32) stat; assertTrue(fstat32.cTimeNanoSecs() > 0); assertTrue(fstat32.mTimeNanoSecs() > 0); assertTrue(fstat32.aTimeNanoSecs() > 0); assertEquals(fstat32.cTimeNanoSecs(), fstat32.mTimeNanoSecs()); } else { LinuxFileStat64 fstat64 = (LinuxFileStat64) stat; assertTrue(fstat64.cTimeNanoSecs() > 0); assertTrue(fstat64.mTimeNanoSecs() > 0); assertTrue(fstat64.aTimeNanoSecs() > 0); assertEquals(fstat64.cTimeNanoSecs(), fstat64.mTimeNanoSecs()); } } finally { f.delete(); } } } @Test public void structStatSize() throws Throwable { >>>>>>> // FIXME: I could guarantee this does not exist but this was very very quick :) private static final String NON_EXISTENT_FILENAME = "skdjlfklfsdjk"; @Test public void filestatFailed() throws Throwable { FileStat stat = null; // A little wonky without adding a new posixhandler but we are using dummy so this is ok for now // the default handler raises on a problem in stat so we are only verifying this at the moment. try { stat = posix.stat(NON_EXISTENT_FILENAME); } catch (UnsupportedOperationException e) {} assertTrue(stat == null); } @Test public void fileStatNanoTime() throws Throwable { // Currently only linux file stat support nano time resolution jnr.ffi.Platform nativePlatform = jnr.ffi.Platform.getNativePlatform(); if (nativePlatform.getOS() == jnr.ffi.Platform.OS.LINUX) { File f = File.createTempFile("stat", null); try { FileStat st = posix.stat(f.getAbsolutePath()); assertNotNull("posix.stat failed", st); FileStat stat = posix.allocateStat(); int result = posix.stat(f.getAbsolutePath(), stat); assertNotNull("posix.stat failed", st); assertEquals(0, result); if (Platform.IS_32_BIT) { LinuxFileStat32 fstat32 = (LinuxFileStat32) stat; assertTrue(fstat32.cTimeNanoSecs() > 0); assertTrue(fstat32.mTimeNanoSecs() > 0); assertTrue(fstat32.aTimeNanoSecs() > 0); assertEquals(fstat32.cTimeNanoSecs(), fstat32.mTimeNanoSecs()); } else { LinuxFileStat64 fstat64 = (LinuxFileStat64) stat; assertTrue(fstat64.cTimeNanoSecs() > 0); assertTrue(fstat64.mTimeNanoSecs() > 0); assertTrue(fstat64.aTimeNanoSecs() > 0); assertEquals(fstat64.cTimeNanoSecs(), fstat64.mTimeNanoSecs()); } } finally { f.delete(); } } } @Test public void structStatSize() throws Throwable {
<<<<<<< int getdtablesize(); ======= int dup(int fd); int dup2(int oldFd, int newFd); >>>>>>> int dup(int fd); int dup2(int oldFd, int newFd); int getdtablesize();
<<<<<<< import javax.swing.JScrollPane; ======= import javax.swing.SwingConstants; >>>>>>> import javax.swing.JScrollPane; import javax.swing.SwingConstants; <<<<<<< final FreeplaneToolBar toolbar = new FreeplaneToolBar(); toolbar.putClientProperty(ViewController.VISIBLE_PROPERTY_KEY, "toolbarVisible"); userInputListenerFactory.addToolBar("/main_toolbar", ViewController.TOP, toolbar); userInputListenerFactory.addToolBar("/filter_toolbar", ViewController.TOP, FilterController.getController(controller).getFilterToolbar()); userInputListenerFactory.addToolBar("/status",ViewController.BOTTOM, controller.getViewController().getStatusBar()); ======= final FreeplaneToolBar toolbar = new FreeplaneToolBar("main_toolbar", SwingConstants.HORIZONTAL); userInputListenerFactory.addMainToolBar("/main_toolbar", toolbar); userInputListenerFactory.addMainToolBar("/filter_toolbar", FilterController.getController(controller).getFilterToolbar()); >>>>>>> final FreeplaneToolBar toolbar = new FreeplaneToolBar("main_toolbar", SwingConstants.HORIZONTAL); toolbar.putClientProperty(ViewController.VISIBLE_PROPERTY_KEY, "toolbarVisible"); userInputListenerFactory.addToolBar("/main_toolbar", ViewController.TOP, toolbar); userInputListenerFactory.addToolBar("/filter_toolbar", ViewController.TOP, FilterController.getController(controller).getFilterToolbar()); userInputListenerFactory.addToolBar("/status",ViewController.BOTTOM, controller.getViewController().getStatusBar());
<<<<<<< import org.freeplane.plugin.script.IFreeplaneScript; import org.freeplane.plugin.script.GroovyShellFreeplaneScript; ======= import org.freeplane.plugin.script.ScriptingEngine; import org.freeplane.plugin.script.ScriptingPermissions; >>>>>>> import org.freeplane.plugin.script.IFreeplaneScript; import org.freeplane.plugin.script.GroovyShellFreeplaneScript; import org.freeplane.plugin.script.ScriptingPermissions; <<<<<<< ======= final ScriptingPermissions formulaPermissions = ScriptingPermissions.getFormulaPermissions(); if(compiledScript == null) { try { compiledScript = ScriptingEngine.compileScriptCheckExceptions(script, ScriptingEngine.IGNORING_SCRIPT_ERROR_HANDLER, printStream, formulaPermissions); } catch (Exception e) { canNotCompileScript = true; return false; } } >>>>>>> <<<<<<< result = script.setOutStream(printStream).execute(node); ======= result = ScriptingEngine.executeScript(node, script, compiledScript, printStream, formulaPermissions); >>>>>>> result = script.setOutStream(printStream).execute(node);
<<<<<<< import org.freeplane.features.common.addins.styles.MapStyle; import org.freeplane.features.common.addins.styles.MapStyleModel; import org.freeplane.features.common.addins.styles.MapViewLayout; ======= import org.freeplane.core.resources.ResourceController; import org.freeplane.features.common.addins.mapstyle.MapStyle; import org.freeplane.features.common.addins.mapstyle.MapStyleModel; import org.freeplane.features.common.addins.mapstyle.MapViewLayout; >>>>>>> import org.freeplane.features.common.addins.styles.MapStyle; import org.freeplane.features.common.addins.styles.MapViewLayout;
<<<<<<< private View view; ======= private PointF point; private float radius; private View overlay; >>>>>>> private View overlay; <<<<<<< private OnTargetActionListener actionListener; private Shape shape; ======= >>>>>>> private Shape shape; <<<<<<< private CustomTarget(Shape shape, View view, OnTargetStateChangedListener listener) { this.shape = shape; this.view = view; ======= private CustomTarget(PointF point, float radius, View overlay, OnTargetStateChangedListener listener) { this.point = point; this.radius = radius; this.overlay = overlay; >>>>>>> private CustomTarget(Shape shape, View overlay, OnTargetStateChangedListener listener) { this.shape = shape; this.overlay = overlay; <<<<<<< return new CustomTarget(shape, view, listener); ======= PointF point = new PointF(startX, startY); return new CustomTarget(point, radius, overlay, listener); >>>>>>> return new CustomTarget(shape, overlay, listener);
<<<<<<< import org.freeplane.core.filter.condition.ICondition; import org.freeplane.core.modecontroller.ModeController; ======= import org.freeplane.core.filter.condition.ISelectableCondition; >>>>>>> import org.freeplane.core.modecontroller.ModeController; import org.freeplane.core.filter.condition.ISelectableCondition;
<<<<<<< Shape getShape(); ======= View getOverlay(); >>>>>>> Shape getShape(); <<<<<<< public View getView() { ======= public float getRadius() { return 100f; } @Override public View getOverlay() { >>>>>>> public View getOverlay() {
<<<<<<< userInputListenerFactory.addToolBar("/fbuttons", ViewController.TOP, fButtonToolBar); controller.addAction(new ToggleToolbarAction(controller, "ToggleFBarAction", "/fbuttons")); SModeControllerFactory.createModeController(modeController); ======= userInputListenerFactory.addMainToolBar("/fbuttons", fButtonToolBar); controller.addAction(new ToggleToolbarAction(controller, "ToggleFBarAction", "/fbuttons", "fbarVisible")); modeController.addAction(new SetAcceleratorOnNextClickAction(controller)); >>>>>>> userInputListenerFactory.addToolBar("/fbuttons", ViewController.TOP, fButtonToolBar); controller.addAction(new ToggleToolbarAction(controller, "ToggleFBarAction", "/fbuttons")); SModeControllerFactory.createModeController(modeController); modeController.addAction(new SetAcceleratorOnNextClickAction(controller));
<<<<<<< /** */ ======= protected int depth(final NodeModel node) { if (node.isRoot()) { return 0; } return depth((NodeModel) node.getParent()) + 1; } >>>>>>> <<<<<<< if (controller.getModeController().getMapController().isFolded(node) || !controller.getModeController().getMapController().hasChildren(node)) { return node.depth(); ======= final MapController mapController = controller.getModeController().getMapController(); if (mapController.isFolded(node) || !mapController.hasChildren(node)) { return depth(node); >>>>>>> final MapController mapController = controller.getModeController().getMapController(); if (mapController.isFolded(node) || !mapController.hasChildren(node)) { return node.depth(); <<<<<<< if (controller.getModeController().getMapController().isFolded(node)) { return node.depth(); ======= final MapController mapController = controller.getModeController().getMapController(); if (mapController.isFolded(node)) { return depth(node); >>>>>>> final MapController mapController = controller.getModeController().getMapController(); if (mapController.isFolded(node)) { return node.depth();
<<<<<<< import org.freeplane.core.filter.condition.ICondition; import org.freeplane.core.modecontroller.ModeController; ======= import org.freeplane.core.filter.condition.ISelectableCondition; >>>>>>> import org.freeplane.core.modecontroller.ModeController; import org.freeplane.core.filter.condition.ISelectableCondition;
<<<<<<< import org.freeplane.features.common.map.MapModel; import org.freeplane.features.common.map.NodeModel; ======= import java.io.File; import org.freeplane.core.model.MapModel; import org.freeplane.core.model.NodeModel; >>>>>>> import java.io.File; import org.freeplane.features.common.map.MapModel; import org.freeplane.features.common.map.NodeModel; <<<<<<< ======= public File getFile() { return getDelegate().getFile(); } >>>>>>> public File getFile() { return getDelegate().getFile(); }
<<<<<<< public static boolean useRibbonsMenu() { String bool = ResourceController.getResourceController().getProperty("menu.ribbons", null); if(bool == null) { bool = "true"; ResourceController.getResourceController().setProperty("menu.ribbons", bool); } return Boolean.parseBoolean(bool); } ======= public static boolean isEditingText() { final Component focusOwner = FocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); final boolean isTextComponentFocused = focusOwner instanceof JTextComponent; return isTextComponentFocused && ((JTextComponent)focusOwner).isEditable(); } >>>>>>> public static boolean useRibbonsMenu() { String bool = ResourceController.getResourceController().getProperty("menu.ribbons", null); if(bool == null) { bool = "true"; ResourceController.getResourceController().setProperty("menu.ribbons", bool); } return Boolean.parseBoolean(bool); } public static boolean isEditingText() { final Component focusOwner = FocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); final boolean isTextComponentFocused = focusOwner instanceof JTextComponent; return isTextComponentFocused && ((JTextComponent)focusOwner).isEditable(); }
<<<<<<< controller.addExtension(HighlightController.class, new HighlightController()); ======= controller.addAction(currentController.getAction("AboutAction")); >>>>>>> controller.addExtension(HighlightController.class, new HighlightController()); controller.addAction(currentController.getAction("AboutAction"));
<<<<<<< ======= import org.freeplane.features.mindmapnode.pattern.IExternalPatternAction; import org.freeplane.features.mindmapnode.pattern.Pattern; import org.freeplane.features.mindmapnode.pattern.ScriptEditorProperty; import org.freeplane.plugin.script.ExecuteScriptAction.ExecutionMode; >>>>>>> import org.freeplane.plugin.script.ExecuteScriptAction.ExecutionMode; <<<<<<< class ScriptingRegistration { ======= class ScriptingRegistration implements IExternalPatternAction { /** create scripts submenu if there are more scripts than this number. */ private static final int MINIMAL_SCRIPT_COUNT_FOR_SUBMENU = 1; private static final String MENU_BAR_SCRIPTING_PARENT_LOCATION = "/menu_bar/extras/first"; private static final String MENU_BAR_SCRIPTING_LOCATION = MENU_BAR_SCRIPTING_PARENT_LOCATION + "/scripting"; >>>>>>> class ScriptingRegistration { /** create scripts submenu if there are more scripts than this number. */ private static final int MINIMAL_SCRIPT_COUNT_FOR_SUBMENU = 1; private static final String MENU_BAR_SCRIPTING_PARENT_LOCATION = "/menu_bar/extras/first"; private static final String MENU_BAR_SCRIPTING_LOCATION = MENU_BAR_SCRIPTING_PARENT_LOCATION + "/scripting"; <<<<<<< ======= public void act(final NodeModel node, final Pattern pattern) { if (pattern.getPatternScript() != null && pattern.getPatternScript().getValue() != null) { ScriptingEngine.executeScript(node, HtmlTools.unescapeHTMLUnicodeEntity(pattern .getPatternScript().getValue()), modeController, new IErrorHandler() { public void gotoLine(final int pLineNumber) { } }, System.out, getScriptCookies()); } } >>>>>>> <<<<<<< ======= modeController.addExtension(IExternalPatternAction.class, this); final Controller controller = modeController.getController(); >>>>>>> final Controller controller = modeController.getController();
<<<<<<< import org.freeplane.core.ui.menubuilders.generic.BuildProcessFactory; ======= import org.freeplane.core.ui.menubuilders.generic.BuildPhaseListener; import org.freeplane.core.ui.menubuilders.generic.ChildEntryFilter; import org.freeplane.core.ui.menubuilders.generic.Entry; >>>>>>> import org.freeplane.core.ui.menubuilders.generic.BuildProcessFactory; import org.freeplane.core.ui.menubuilders.generic.BuildPhaseListener; import org.freeplane.core.ui.menubuilders.generic.ChildEntryFilter; import org.freeplane.core.ui.menubuilders.generic.Entry; <<<<<<< ======= uiBuilder.addBuilder("map_popup", new MapPopupBuilder(userInputListenerFactory)); uiBuilder.setSubtreeDefaultBuilderPair("map_popup", "menu.action"); uiBuilder.addBuilder("node_popup", new NodePopupBuilder(userInputListenerFactory)); uiBuilder.setSubtreeDefaultBuilderPair("node_popup", "menu.action"); actionBuilder.addBuilder("ignore", new ChildEntryFilter() { @Override public boolean shouldRemove(Entry entry) { return ! uiBuilder.containsOneOf(entry.builders()); } }); >>>>>>>
<<<<<<< import org.n52.shetland.ogc.ows.exception.CodedException; import org.n52.shetland.ogc.ows.exception.OwsExceptionReport; import org.n52.shetland.ogc.sos.request.GetObservationRequest; ======= import org.n52.sos.ds.hibernate.dao.observation.ValuedObservationFactory; >>>>>>> import org.n52.shetland.ogc.ows.exception.CodedException; import org.n52.shetland.ogc.ows.exception.OwsExceptionReport; import org.n52.shetland.ogc.sos.request.GetObservationRequest; import org.n52.sos.ds.hibernate.dao.observation.ValuedObservationFactory; <<<<<<< ======= @Override protected ValuedObservationFactory getValuedObservationFactory() { return SeriesValuedObervationFactory.getInstance(); } // /** // * Query the minimum {@link TemporalReferencedSeriesObservation} for parameter // * // * @param request // * {@link GetObservationRequest} // * @param series // * Datasource series id // * @param temporalFilterCriterion // * Temporal filter {@link Criterion} // * @param session // * Hibernate Session // * @return Resulting minimum {@link TemporalReferencedSeriesObservation} // * @throws OwsExceptionReport // * If an error occurs when executing the query // */ // public TemporalReferencedSeriesObservation getMinSeriesValueFor(GetObservationRequest request, long series, // Criterion temporalFilterCriterion, Session session) throws OwsExceptionReport { // return (TemporalReferencedSeriesObservation) getSeriesValueCriteriaFor(request, series, temporalFilterCriterion, // SosConstants.SosIndeterminateTime.first, session).uniqueResult(); // } // // /** // * Query the maximum {@link TemporalReferencedSeriesObservation} for parameter // * // * @param request // * {@link GetObservationRequest} // * @param series // * Datasource series id // * @param temporalFilterCriterion // * Temporal filter {@link Criterion} // * @param session // * Hibernate Session // * @return Resulting maximum {@link TemporalReferencedSeriesObservation} // * @throws OwsExceptionReport // * If an error occurs when executing the query // */ // public TemporalReferencedSeriesObservation getMaxSeriesValueFor(GetObservationRequest request, long series, // Criterion temporalFilterCriterion, Session session) throws OwsExceptionReport { // return (TemporalReferencedSeriesObservation) getSeriesValueCriteriaFor(request, series, temporalFilterCriterion, // SosConstants.SosIndeterminateTime.latest, session).uniqueResult(); // } // // /** // * Query the minimum {@link TemporalReferencedSeriesObservation} for parameter // * // * @param request // * {@link GetObservationRequest} // * @param series // * Datasource series id // * @param session // * Hibernate Session // * @return Resulting minimum {@link TemporalReferencedSeriesObservation} // * @throws OwsExceptionReport // * If an error occurs when executing the query // */ // public TemporalReferencedSeriesObservation getMinSeriesValueFor(GetObservationRequest request, long series, Session session) // throws OwsExceptionReport { // return (TemporalReferencedSeriesObservation) getSeriesValueCriteriaFor(request, series, null, SosConstants.SosIndeterminateTime.first, session) // .uniqueResult(); // } // // /** // * Query the maximum {@link TemporalReferencedSeriesObservation} for parameter // * // * @param request // * {@link GetObservationRequest} // * @param series // * Datasource series id // * @param session // * Hibernate Session // * @return Resulting maximum {@link TemporalReferencedSeriesObservation} // * @throws OwsExceptionReport // * If an error occurs when executing the query // */ // public TemporalReferencedSeriesObservation getMaxSeriesValueFor(GetObservationRequest request, long series, Session session) // throws OwsExceptionReport { // return (TemporalReferencedSeriesObservation) getSeriesValueCriteriaFor(request, series, null, SosConstants.SosIndeterminateTime.latest, session) // .uniqueResult(); // } // // /** // * Create {@link Criteria} for parameter // * // * @param request // * {@link GetObservationRequest} // * @param series // * Datasource series id // * @param temporalFilterCriterion // * Temporal filter {@link Criterion} // * @param sosIndeterminateTime // * first/latest indicator // * @param session // * Hibernate Session // * @return Resulting {@link Criteria} // * @throws OwsExceptionReport // * If an error occurs when adding Spatial Filtering Profile // * restrictions // */ // protected Criteria getSeriesValueCriteriaFor(GetObservationRequest request, long series, // Criterion temporalFilterCriterion, SosConstants.SosIndeterminateTime sosIndeterminateTime, Session session) // throws OwsExceptionReport { // final Criteria c = // getDefaultObservationCriteria(TemporalReferencedSeriesObservation.class, session).createAlias(TemporalReferencedSeriesObservation.SERIES, "s"); // checkAndAddSpatialFilteringProfileCriterion(c, request, session); // // c.add(Restrictions.eq("s." + Series.ID, series)); // // if (CollectionHelper.isNotEmpty(request.getOfferings())) { // c.createCriteria(TemporalReferencedSeriesObservation.OFFERINGS).add( // Restrictions.in(Offering.IDENTIFIER, request.getOfferings())); // } // // String logArgs = "request, series, offerings"; // if (temporalFilterCriterion != null) { // logArgs += ", filterCriterion"; // c.add(temporalFilterCriterion); // } // if (sosIndeterminateTime != null) { // logArgs += ", sosIndeterminateTime"; // addIndeterminateTimeRestriction(c, sosIndeterminateTime); // } // LOGGER.debug("QUERY getSeriesObservationFor({}): {}", logArgs, HibernateHelper.getSqlString(c)); // return c; // } // // /** // * Get default {@link Criteria} for {@link Class} // * // * @param clazz // * {@link Class} to get default {@link Criteria} for // * @param session // * Hibernate Session // * @return Default {@link Criteria} // */ // public Criteria getDefaultObservationCriteria(Class<?> clazz, Session session) { // return session.createCriteria(clazz).add(Restrictions.eq(TemporalReferencedSeriesObservation.DELETED, false)) // .setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); // } >>>>>>> @Override protected ValuedObservationFactory getValuedObservationFactory() { return SeriesValuedObervationFactory.getInstance(); }
<<<<<<< final JFileChooser chooser = getFileChooser(true); new MindMapPreview(chooser); ======= final JFileChooser chooser = getFileChooser(); >>>>>>> final JFileChooser chooser = getFileChooser(); new MindMapPreview(chooser);
<<<<<<< public boolean checkNode(ModeController modeController, final NodeModel node) { for(ICondition condition : conditions) { if (!condition.checkNode(modeController, node)) { ======= public boolean checkNode(final NodeModel node) { for(ISelectableCondition condition : conditions) { if (!condition.checkNode(node)) { >>>>>>> public boolean checkNode(ModeController modeController, final NodeModel node) { for(ISelectableCondition condition : conditions) { if (!condition.checkNode(modeController, node)) {
<<<<<<< public int depth() { final NodeModel parentNode = getParentNode(); if (parentNode == null) { return 0; } return parentNode.depth() + 1; } ======= public void insert(NodeModel newNodeModel) { insert(newNodeModel, getChildCount()); } >>>>>>> public int depth() { final NodeModel parentNode = getParentNode(); if (parentNode == null) { return 0; } return parentNode.depth() + 1; } public void insert(NodeModel newNodeModel) { insert(newNodeModel, getChildCount()); }
<<<<<<< else{ final String shape = NodeStyleController.getController(modeController).getShape(model); if (shape.equals(NodeStyleModel.STYLE_FORK)) { view = new ForkMainView(); } else if (shape.equals(NodeStyleModel.STYLE_BUBBLE)) { view = new BubbleMainView(); } else { System.err.println("Tried to create a NodeView of unknown Style " + shape); view = new ForkMainView(); } ======= else { System.err.println("Tried to create a NodeView of unknown Style " + String.valueOf(shape)); return new ForkMainView(); >>>>>>> else{ final String shape = NodeStyleController.getController(modeController).getShape(model); if (shape.equals(NodeStyleModel.STYLE_FORK)) { view = new ForkMainView(); } else if (shape.equals(NodeStyleModel.STYLE_BUBBLE)) { view = new BubbleMainView(); } else { System.err.println("Tried to create a NodeView of unknown Style " + String.valueOf(shape)); view = new ForkMainView(); }
<<<<<<< modeController.registerExtensionCopier(new ExtensionCopier()); iconToolBar = new FreeplaneToolBar(); ======= iconToolBar = new FreeplaneToolBar("icon_toolbar", SwingConstants.VERTICAL); >>>>>>> modeController.registerExtensionCopier(new ExtensionCopier()); iconToolBar = new FreeplaneToolBar("icon_toolbar", SwingConstants.VERTICAL); <<<<<<< iconToolBar.setOrientation(SwingConstants.VERTICAL); iconToolBarScrollPane.putClientProperty(ViewController.VISIBLE_PROPERTY_KEY, "leftToolbarVisible"); ======= >>>>>>> iconToolBarScrollPane.putClientProperty(ViewController.VISIBLE_PROPERTY_KEY, "leftToolbarVisible");
<<<<<<< import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ======= >>>>>>> import java.awt.event.ActionEvent; import java.awt.event.ActionListener; <<<<<<< import javax.swing.Timer; ======= import javax.swing.UIDefaults; >>>>>>> import javax.swing.Timer; import javax.swing.UIDefaults;
<<<<<<< ======= import javax.swing.event.ChangeEvent; >>>>>>> import javax.swing.event.ChangeEvent; <<<<<<< import org.freeplane.features.common.map.NodeModel; import org.freeplane.features.mindmapmode.MModeController; ======= >>>>>>> import org.freeplane.features.common.map.NodeModel; import org.freeplane.features.mindmapmode.MModeController;
<<<<<<< import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.UUID; ======= import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.List; import java.util.UUID; >>>>>>> import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.UUID; <<<<<<< String graphlabTwillPath = config.getString("graphlab.twill.path") + "/bin/graphlab-twill"; String algorithmPath = config.getString("graphlab.algorithm.path") + "/" + algorithm; String clusterSize = config.getString("graphlab.cluster-size"); List<String> args = Lists.newArrayList( graphlabTwillPath, "-i", clusterSize, "localhost:2181", algorithmPath, exportDir.toString(), "adj", importDir.toString() ); logger.debug("executing: " + args); ProcessBuilder processBuilder = new ProcessBuilder(args) .redirectErrorStream(true); Map<String, String> environment = processBuilder.environment(); environment.remove("JAVA_OPTS"); environment.remove("LOGGER_MANAGER"); Process process = processBuilder.start(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream(), Charsets.US_ASCII))) { String line = reader.readLine(); while (line != null) { logger.info(line); line = reader.readLine(); ======= String graphlabTwillPath = config.getString("graphlab.twill.path") + "/bin/graphlab-twill"; String zookeeperPath = config.getString("graphlab.twill.zookeeper.url"); String algorithmPath = config.getString("graphlab.algorithm.path") + "/" + algorithm; String clusterSize = config.getString("graphlab.cluster-size"); List<String> args = Lists.newArrayList( graphlabTwillPath, "-i", clusterSize, zookeeperPath, algorithmPath, exportDir.toString(), "adj", importDir.toString() ); logger.debug("executing: " + args); ProcessBuilder processBuilder = new ProcessBuilder(args) .redirectErrorStream(true); Process process = processBuilder.start(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream(), Charsets.US_ASCII))) { String line = reader.readLine(); while (line != null) { logger.info(line); line = reader.readLine(); >>>>>>> String graphlabTwillPath = config.getString("graphlab.twill.path") + "/bin/graphlab-twill"; String zookeeperPath = config.getString("graphlab.twill.zookeeper.url"); String algorithmPath = config.getString("graphlab.algorithm.path") + "/" + algorithm; String clusterSize = config.getString("graphlab.cluster-size"); List<String> args = Lists.newArrayList( graphlabTwillPath, "-i", clusterSize, zookeeperPath, algorithmPath, exportDir.toString(), "adj", importDir.toString() ); logger.debug("executing: " + args); ProcessBuilder processBuilder = new ProcessBuilder(args) .redirectErrorStream(true); Map<String, String> environment = processBuilder.environment(); environment.remove("JAVA_OPTS"); environment.remove("LOGGER_MANAGER"); Process process = processBuilder.start(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream(), Charsets.US_ASCII))) { String line = reader.readLine(); while (line != null) { logger.info(line); line = reader.readLine();
<<<<<<< import org.freeplane.core.ui.menubuilders.generic.BuildProcessFactory; ======= import org.freeplane.core.ui.menubuilders.generic.BuildPhaseListener; >>>>>>> import org.freeplane.core.ui.menubuilders.generic.BuildProcessFactory; import org.freeplane.core.ui.menubuilders.generic.BuildPhaseListener; <<<<<<< ======= public JRibbon getRibbon() { Component frame = UITools.getMenuComponent(); if(frame instanceof JRibbonFrame) { return ((JRibbonFrame)frame).getRibbon(); } else { throw new RuntimeException("ribbons not activated"); } } >>>>>>> <<<<<<< final BuildProcessFactory buildProcessFactory = useRibbonMenu() ? new RibbonBuildProcessFactory(this, Controller.getCurrentModeController(), resourceAccessor, acceleratorManager, entries): new MenuBuildProcessFactory(this, Controller.getCurrentModeController(), resourceAccessor, acceleratorManager, entries); final PhaseProcessor buildProcessor = buildProcessFactory.getBuildProcessor(); subtreeBuilder = buildProcessFactory.getChildProcessor(); ======= final MenuBuildProcessFactory menuBuildProcessFactory = new MenuBuildProcessFactory(); final PhaseProcessor buildProcessor = menuBuildProcessFactory.createBuildProcessor(this, Controller.getCurrentModeController(), resourceAccessor, acceleratorManager, entries, buildPhaseListeners) .getBuildProcessor(); subtreeBuilder = menuBuildProcessFactory.getChildProcessor(); acceleratorManager.addAcceleratorChangeListener(new MenuAcceleratorChangeListener(entries)); >>>>>>> final BuildProcessFactory buildProcessFactory = useRibbonMenu() ? new RibbonBuildProcessFactory(this, Controller.getCurrentModeController(), resourceAccessor, acceleratorManager, entries): new MenuBuildProcessFactory(this, Controller.getCurrentModeController(), resourceAccessor, acceleratorManager, entries, buildPhaseListeners); final PhaseProcessor buildProcessor = buildProcessFactory.getBuildProcessor(); subtreeBuilder = buildProcessFactory.getChildProcessor(); acceleratorManager.addAcceleratorChangeListener(new MenuAcceleratorChangeListener(entries));
<<<<<<< private boolean copyMap(final MapModel map, final String pDirectoryName) throws IOException { final boolean success = true; ======= private boolean copyMap(MapModel map, final String pDirectoryName){ boolean success = true; try { >>>>>>> private boolean copyMap(final MapModel map, final String pDirectoryName){ boolean success = true; try { <<<<<<< getModeController().getMapController().getFilteredXml(map, fileout, Mode.EXPORT, true); ======= getModeController().getMapController().getFilteredXml(map, fileout, Mode.EXPORT); } catch (IOException e) { success = false; } >>>>>>> getModeController().getMapController().getFilteredXml(map, fileout, Mode.EXPORT, true); } catch (IOException e) { success = false; }
<<<<<<< Controller.getCurrentController().getViewController().removeSplitPane(); ======= if(noteViewer != null){ noteViewer.setText(""); } >>>>>>> if(noteViewer != null){ noteViewer.setText(""); } <<<<<<< Controller.getCurrentController().getViewController().insertComponentIntoSplitPane(getNoteViewerComponent()); noteViewer.setText(noteText); try { noteViewer.setText(noteText); } catch (final Exception ex) { setTextWithExceptionInfo(noteText, ex); ======= if(noteViewer == null){ controller.getViewController().insertComponentIntoSplitPane(createNoteViewerComponent()); >>>>>>> if(noteViewer == null){ Controller.getCurrentController().getViewController().insertComponentIntoSplitPane(createNoteViewerComponent()); <<<<<<< private void setTextWithExceptionInfo(final String text, final Exception ex) { final String string = HtmlUtils.combineTextWithExceptionInfo(text, ex); noteViewer.setText(string); } ======= >>>>>>>
<<<<<<< /* * Freeplane - mind map editor * Copyright (C) 2008 Joerg Mueller, Daniel Polansky, Christian Foltin, Dimitry Polivaev * * This file is modified by Dimitry Polivaev in 2008. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.freeplane.features.url.mindmapmode; import java.awt.event.ActionEvent; import java.io.File; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import javax.swing.JOptionPane; import org.freeplane.core.ui.AFreeplaneAction; import org.freeplane.core.ui.components.UITools; import org.freeplane.core.util.LogUtils; import org.freeplane.core.util.TextUtils; import org.freeplane.features.link.LinkController; import org.freeplane.features.link.NodeLinks; import org.freeplane.features.link.mindmapmode.MLinkController; import org.freeplane.features.map.MapModel; import org.freeplane.features.map.NodeModel; import org.freeplane.features.map.mindmapmode.MMapController; import org.freeplane.features.mode.Controller; import org.freeplane.features.mode.ModeController; import org.freeplane.features.mode.PersistentNodeHook; import org.freeplane.features.ui.ViewController; import org.freeplane.features.url.UrlManager; class ImportLinkedBranchAction extends AFreeplaneAction { /** * */ private static final long serialVersionUID = 1L; public ImportLinkedBranchAction() { super("ImportLinkedBranchAction"); } public void actionPerformed(final ActionEvent e) { final MapModel map = Controller.getCurrentController().getMap(); final ModeController modeController = Controller.getCurrentModeController(); final NodeModel selected = modeController.getMapController().getSelectedNode(); final ViewController viewController = Controller.getCurrentController().getViewController(); if (selected == null || NodeLinks.getLink(selected) == null) { JOptionPane.showMessageDialog((viewController.getMapView()), TextUtils .getText("import_linked_branch_no_link")); return; } final URI uri = NodeLinks.getLink(selected); try { final File file = uri.isAbsolute() && !uri.isOpaque() ? new File(uri) : new File(new URL(map.getURL(), uri .getPath()).getFile()); final NodeModel node = ((MFileManager) UrlManager.getController()).loadTree(map, file); PersistentNodeHook.removeMapExtensions(node); ((MMapController) modeController.getMapController()).insertNode(node, selected); ((MLinkController) LinkController.getController()).setLink(selected, (URI) null, LinkController.LINK_ABSOLUTE); ((MLinkController) LinkController.getController()).setLink(node, (URI) null, LinkController.LINK_ABSOLUTE); } catch (final MalformedURLException ex) { UITools.errorMessage(TextUtils.format("invalid_url_msg", uri.toString())); LogUtils.warn(ex); return; } catch (final IllegalArgumentException ex) { UITools.errorMessage(TextUtils.format("invalid_file_msg", uri.toString())); LogUtils.warn(ex); return; } catch (final Exception ex) { UrlManager.getController().handleLoadingException(ex); } } } ======= /* * Freeplane - mind map editor * Copyright (C) 2008 Joerg Mueller, Daniel Polansky, Christian Foltin, Dimitry Polivaev * * This file is modified by Dimitry Polivaev in 2008. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.freeplane.features.url.mindmapmode; import java.awt.event.ActionEvent; import java.io.File; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import javax.swing.JOptionPane; import org.freeplane.core.ui.AFreeplaneAction; import org.freeplane.core.ui.components.UITools; import org.freeplane.core.util.LogUtils; import org.freeplane.core.util.TextUtils; import org.freeplane.features.link.LinkController; import org.freeplane.features.link.NodeLinks; import org.freeplane.features.link.mindmapmode.MLinkController; import org.freeplane.features.map.MapModel; import org.freeplane.features.map.NodeModel; import org.freeplane.features.map.mindmapmode.MMapController; import org.freeplane.features.mode.Controller; import org.freeplane.features.mode.ModeController; import org.freeplane.features.mode.PersistentNodeHook; import org.freeplane.features.ui.IMapViewManager; import org.freeplane.features.url.UrlManager; class ImportLinkedBranchAction extends AFreeplaneAction { /** * */ private static final long serialVersionUID = 1L; public ImportLinkedBranchAction() { super("ImportLinkedBranchAction"); } public void actionPerformed(final ActionEvent e) { final MapModel map = Controller.getCurrentController().getMap(); final ModeController modeController = Controller.getCurrentModeController(); final NodeModel selected = modeController.getMapController().getSelectedNode(); final IMapViewManager viewController = Controller.getCurrentController().getMapViewManager(); if (selected == null || NodeLinks.getLink(selected) == null) { JOptionPane.showMessageDialog((viewController.getMapViewComponent()), TextUtils .getText("import_linked_branch_no_link")); return; } final URI uri = NodeLinks.getLink(selected); try { final File file = uri.isAbsolute() && !uri.isOpaque() ? new File(uri) : new File(new URL(map.getURL(), uri .getPath()).getFile()); final NodeModel node = ((MFileManager) UrlManager.getController()).loadTree(map, file); PersistentNodeHook.removeMapExtensions(node); ((MMapController) modeController.getMapController()).insertNode(node, selected); ((MLinkController) LinkController.getController()).setLink(selected, (URI) null, false); ((MLinkController) LinkController.getController()).setLink(node, (URI) null, false); } catch (final MalformedURLException ex) { UITools.errorMessage(TextUtils.format("invalid_url_msg", uri.toString())); LogUtils.warn(ex); return; } catch (final IllegalArgumentException ex) { UITools.errorMessage(TextUtils.format("invalid_file_msg", uri.toString())); LogUtils.warn(ex); return; } catch (final Exception ex) { UrlManager.getController().handleLoadingException(ex); } } } >>>>>>> /* * Freeplane - mind map editor * Copyright (C) 2008 Joerg Mueller, Daniel Polansky, Christian Foltin, Dimitry Polivaev * * This file is modified by Dimitry Polivaev in 2008. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.freeplane.features.url.mindmapmode; import java.awt.event.ActionEvent; import java.io.File; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import javax.swing.JOptionPane; import org.freeplane.core.ui.AFreeplaneAction; import org.freeplane.core.ui.components.UITools; import org.freeplane.core.util.LogUtils; import org.freeplane.core.util.TextUtils; import org.freeplane.features.link.LinkController; import org.freeplane.features.link.NodeLinks; import org.freeplane.features.link.mindmapmode.MLinkController; import org.freeplane.features.map.MapModel; import org.freeplane.features.map.NodeModel; import org.freeplane.features.map.mindmapmode.MMapController; import org.freeplane.features.mode.Controller; import org.freeplane.features.mode.ModeController; import org.freeplane.features.mode.PersistentNodeHook; import org.freeplane.features.ui.IMapViewManager; import org.freeplane.features.ui.ViewController; import org.freeplane.features.url.UrlManager; class ImportLinkedBranchAction extends AFreeplaneAction { /** * */ private static final long serialVersionUID = 1L; public ImportLinkedBranchAction() { super("ImportLinkedBranchAction"); } public void actionPerformed(final ActionEvent e) { final MapModel map = Controller.getCurrentController().getMap(); final ModeController modeController = Controller.getCurrentModeController(); final NodeModel selected = modeController.getMapController().getSelectedNode(); final IMapViewManager viewController = Controller.getCurrentController().getMapViewManager(); if (selected == null || NodeLinks.getLink(selected) == null) { JOptionPane.showMessageDialog((viewController.getMapViewComponent()), TextUtils .getText("import_linked_branch_no_link")); return; } final URI uri = NodeLinks.getLink(selected); try { final File file = uri.isAbsolute() && !uri.isOpaque() ? new File(uri) : new File(new URL(map.getURL(), uri .getPath()).getFile()); final NodeModel node = ((MFileManager) UrlManager.getController()).loadTree(map, file); PersistentNodeHook.removeMapExtensions(node); ((MMapController) modeController.getMapController()).insertNode(node, selected); ((MLinkController) LinkController.getController()).setLink(selected, (URI) null, LinkController.LINK_ABSOLUTE); ((MLinkController) LinkController.getController()).setLink(node, (URI) null, LinkController.LINK_ABSOLUTE); } catch (final MalformedURLException ex) { UITools.errorMessage(TextUtils.format("invalid_url_msg", uri.toString())); LogUtils.warn(ex); return; } catch (final IllegalArgumentException ex) { UITools.errorMessage(TextUtils.format("invalid_file_msg", uri.toString())); LogUtils.warn(ex); return; } catch (final Exception ex) { UrlManager.getController().handleLoadingException(ex); } } }
<<<<<<< import org.apache.commons.lang.StringUtils; import org.freeplane.core.controller.IMapSelection; ======= >>>>>>> import org.apache.commons.lang.StringUtils; import org.freeplane.core.controller.IMapSelection; <<<<<<< import org.freeplane.features.common.addins.styles.MapStyle; import org.freeplane.features.common.addins.styles.MapViewLayout; import org.freeplane.features.common.map.MapController; import org.freeplane.features.common.map.MapModel; import org.freeplane.features.common.map.ModeController; import org.freeplane.features.common.map.NodeModel; ======= import org.freeplane.core.modecontroller.IMapSelection; import org.freeplane.core.modecontroller.MapController; import org.freeplane.core.modecontroller.ModeController; import org.freeplane.core.model.MapModel; import org.freeplane.core.model.NodeModel; import org.freeplane.features.common.addins.mapstyle.MapStyle; import org.freeplane.features.common.addins.mapstyle.MapViewLayout; >>>>>>> import org.freeplane.features.common.addins.styles.MapStyle; import org.freeplane.features.common.addins.styles.MapViewLayout; import org.freeplane.features.common.map.MapController; import org.freeplane.features.common.map.MapModel; import org.freeplane.features.common.map.ModeController; import org.freeplane.features.common.map.NodeModel; <<<<<<< for (final MapView mapView : mapViewVector) { if (StringUtils.equals(mapViewDisplayName, mapView.getName())) { ======= for (final MapView mapView : mapViewVector) { final String mapViewName = mapView.getName(); if (mapViewDisplayName == mapViewName || mapViewDisplayName != null && mapViewDisplayName.equals(mapViewName)) { >>>>>>> for (final MapView mapView : mapViewVector) { final String mapViewName = mapView.getName(); if (mapViewDisplayName == mapViewName || mapViewDisplayName != null && mapViewDisplayName.equals(mapViewName)) { <<<<<<< return Collections.unmodifiableMap(returnValue); } public List<Component> getViews(final MapModel map) { final LinkedList<Component> list = new LinkedList<Component>(); for (final MapView view : mapViewVector) { if (view.getModel().equals(map)) { list.add(view); } } return list; } ======= return Collections.unmodifiableMap(returnValue); } >>>>>>> return Collections.unmodifiableMap(returnValue); } public List<Component> getViews(final MapModel map) { final LinkedList<Component> list = new LinkedList<Component>(); for (final MapView view : mapViewVector) { if (view.getModel().equals(map)) { list.add(view); } } return list; }
<<<<<<< import java.util.List; ======= import java.util.Optional; >>>>>>> import java.util.List; import java.util.Optional;
<<<<<<< if (url.getPath().toLowerCase(Locale.ENGLISH).endsWith(".svg")) { result = FreeplaneIconUtils.createSVGIcon(url, widthPixels, heightPixels); } else { result = new ImageIcon(url); } ICON_CACHE.put(cacheKey, result); ======= result = FreeplaneIconUtils.createImageIconPrivileged(url); ICON_CACHE.put(url, result); >>>>>>> if (url.getPath().toLowerCase(Locale.ENGLISH).endsWith(".svg")) { result = FreeplaneIconUtils.createSVGIcon(url, widthPixels, heightPixels); } else { result = FreeplaneIconUtils.createImageIconPrivileged(url); } ICON_CACHE.put(cacheKey, result);
<<<<<<< ======= import org.freeplane.core.modecontroller.ModeController; import org.freeplane.core.model.NodeModel; import org.freeplane.core.resources.FpStringUtils; import org.freeplane.core.resources.ResourceBundles; >>>>>>> <<<<<<< import org.freeplane.core.util.LogUtils; import org.freeplane.core.util.TextUtils; ======= import org.freeplane.core.util.LogTool; >>>>>>> import org.freeplane.core.util.LogUtils; import org.freeplane.core.util.TextUtils; <<<<<<< catch (final URISyntaxException e1) { LogUtils.warn(e1); UITools.errorMessage("wrong URI " + inputValue); ======= catch (final URISyntaxException e1) { LogTool.warn(e1); UITools.errorMessage(FpStringUtils.format("invalid_uri", inputValue)); >>>>>>> catch (final URISyntaxException e1) { LogUtils.warn(e1); UITools.errorMessage(TextUtils.format("invalid_uri", inputValue));
<<<<<<< final NodeStyleController style = (NodeStyleController) getModeController().getExtension(NodeStyleController.class); final Font defaultFont = style.getDefaultFont(node.getMap()); final StringBuilder rule = new StringBuilder(); rule.append("font-family: " + defaultFont.getFamily() + ";"); rule.append("font-size: " + defaultFont.getSize() + "pt;"); rule.append("margin-top:0;"); final String noteText = NoteModel.getNoteText(node).replaceFirst("<body>", "<body><div style=\"" + rule + "\">").replaceFirst("</body>", "</div></body>"); (getModeController().getMapController()).setToolTip(node, "nodeNoteText", new ITooltipProvider() { public String getTooltip() { return noteText; } }); } else { (getModeController().getMapController()).setToolTip(node, "nodeNoteText", null); ======= final String noteText = NoteModel.getNoteText(node); if(noteText != null){ final Font defaultFont = ResourceController.getResourceController().getDefaultFont(); final StringBuilder rule = new StringBuilder(); rule.append("font-family: " + defaultFont.getFamily() + ";"); rule.append("font-size: " + defaultFont.getSize() + "pt;"); rule.append("margin-top:0;"); final String tooltipText = noteText.replaceFirst("<body>", "<body><div style=\"" + rule + "\">").replaceFirst("</body>", "</div></body>"); (getModeController().getMapController()).setToolTip(node, "nodeNoteText", new ITooltipProvider() { public String getTooltip() { return tooltipText; } }); } return; >>>>>>> final String noteText = NoteModel.getNoteText(node); if(noteText != null){ final NodeStyleController style = (NodeStyleController) getModeController().getExtension(NodeStyleController.class); final Font defaultFont = style.getDefaultFont(node.getMap()); final StringBuilder rule = new StringBuilder(); rule.append("font-family: " + defaultFont.getFamily() + ";"); rule.append("font-size: " + defaultFont.getSize() + "pt;"); rule.append("margin-top:0;"); final String tooltipText = noteText.replaceFirst("<body>", "<body><div style=\"" + rule + "\">").replaceFirst("</body>", "</div></body>"); (getModeController().getMapController()).setToolTip(node, "nodeNoteText", new ITooltipProvider() { public String getTooltip() { return tooltipText; } }); } return;
<<<<<<< /* * Freeplane - mind map editor * Copyright (C) 2008 Dimitry Polivaev * * This file author is Dimitry Polivaev * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.freeplane.features.icon; import javax.swing.ComboBoxEditor; import javax.swing.ComboBoxModel; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListModel; import javax.swing.ListCellRenderer; import javax.swing.ListModel; import org.freeplane.core.resources.NamedObject; import org.freeplane.core.util.TextUtils; import org.freeplane.core.util.collection.ExtendedComboBoxModel; import org.freeplane.features.filter.condition.ASelectableCondition; import org.freeplane.features.filter.condition.ConditionFactory; import org.freeplane.features.filter.condition.DefaultConditionRenderer; import org.freeplane.features.filter.condition.IElementaryConditionController; import org.freeplane.features.mode.Controller; import org.freeplane.n3.nanoxml.XMLElement; /** * @author Dimitry Polivaev * 21.12.2008 */ class IconConditionController implements IElementaryConditionController { static final String FILTER_ICON = "filter_icon"; // // final private Controller controller; public IconConditionController() { super(); // this.controller = controller; } public boolean canEditValues(final Object property, final NamedObject simpleCond) { return false; } public boolean canHandle(final Object selectedItem) { if (!(selectedItem instanceof NamedObject)) { return false; } final NamedObject namedObject = (NamedObject) selectedItem; return namedObject.objectEquals(IconConditionController.FILTER_ICON); } public boolean canSelectValues(final Object property, final NamedObject simpleCond) { return !simpleCond.objectEquals(ConditionFactory.FILTER_EXIST); } public ASelectableCondition createCondition(final Object selectedItem, final NamedObject simpleCond, final Object value, final boolean matchCase, final boolean approximateMatching) { if (simpleCond.objectEquals(ConditionFactory.FILTER_CONTAINS)) return value instanceof UIIcon ? new IconContainedCondition(((UIIcon) value).getName()) : null; if (simpleCond.objectEquals(ConditionFactory.FILTER_EXIST)) return new IconExistsCondition(); return null; } public ComboBoxModel getConditionsForProperty(final Object property) { return new DefaultComboBoxModel(getIconConditionNames()); } public ListModel getFilteredProperties() { final DefaultListModel list = new DefaultListModel(); list.addElement(TextUtils.createTranslatedString(FILTER_ICON)); return list; } public Object[] getIconConditionNames() { return new NamedObject[] { TextUtils.createTranslatedString(ConditionFactory.FILTER_CONTAINS), TextUtils.createTranslatedString(ConditionFactory.FILTER_EXIST), }; } public ComboBoxEditor getValueEditor(Object selectedProperty, NamedObject selectedCondition) { return null; } public ComboBoxModel getValuesForProperty(final Object property, NamedObject simpleCond) { final ListModel icons = Controller.getCurrentController().getMap().getIconRegistry().getIconsAsListModel(); final ExtendedComboBoxModel extendedComboBoxModel = new ExtendedComboBoxModel(); extendedComboBoxModel.setExtensionList(icons); return extendedComboBoxModel; } public boolean isCaseDependent(final Object property, final NamedObject simpleCond) { return false; } public boolean supportsApproximateMatching(final Object property, final NamedObject simpleCond) { return false; } public ASelectableCondition loadCondition(final XMLElement element) { if (element.getName().equalsIgnoreCase(IconContainedCondition.NAME)) { return IconContainedCondition.load(element); } return null; } public ListCellRenderer getValueRenderer(Object selectedProperty, NamedObject selectedCondition) { // don't return null as this would make FilterConditionEditor fall back to filterController.getConditionRenderer() // (and that would put in a default string like "No Filtering (remove)"!) return new DefaultConditionRenderer("", true); } } ======= /* * Freeplane - mind map editor * Copyright (C) 2008 Dimitry Polivaev * * This file author is Dimitry Polivaev * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.freeplane.features.icon; import javax.swing.ComboBoxEditor; import javax.swing.ComboBoxModel; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListModel; import javax.swing.ListCellRenderer; import javax.swing.ListModel; import org.freeplane.core.resources.NamedObject; import org.freeplane.core.util.TextUtils; import org.freeplane.core.util.collection.ExtendedComboBoxModel; import org.freeplane.features.filter.condition.ASelectableCondition; import org.freeplane.features.filter.condition.ConditionFactory; import org.freeplane.features.filter.condition.DefaultConditionRenderer; import org.freeplane.features.filter.condition.IElementaryConditionController; import org.freeplane.features.mode.Controller; import org.freeplane.n3.nanoxml.XMLElement; /** * @author Dimitry Polivaev * 21.12.2008 */ class IconConditionController implements IElementaryConditionController { static final String FILTER_ICON = "filter_icon"; // // final private Controller controller; public IconConditionController() { super(); // this.controller = controller; } public boolean canEditValues(final Object property, final NamedObject simpleCond) { return false; } public boolean canHandle(final Object selectedItem) { if (!(selectedItem instanceof NamedObject)) { return false; } final NamedObject namedObject = (NamedObject) selectedItem; return namedObject.objectEquals(IconConditionController.FILTER_ICON); } public boolean canSelectValues(final Object property, final NamedObject simpleCond) { return !simpleCond.objectEquals(ConditionFactory.FILTER_EXIST); } public ASelectableCondition createCondition(final Object selectedItem, final NamedObject simpleCond, final Object value, final boolean matchCase, final boolean approximateMatching) { if (simpleCond.objectEquals(ConditionFactory.FILTER_CONTAINS)) return value instanceof UIIcon ? new IconContainedCondition(((UIIcon) value).getName()) : null; if (simpleCond.objectEquals(ConditionFactory.FILTER_EXIST)) return new IconExistsCondition(); return null; } public ComboBoxModel getConditionsForProperty(final Object property) { return new DefaultComboBoxModel(getIconConditionNames()); } public ListModel getFilteredProperties() { final DefaultListModel list = new DefaultListModel(); list.addElement(TextUtils.createTranslatedString(FILTER_ICON)); return list; } public Object[] getIconConditionNames() { return new NamedObject[] { TextUtils.createTranslatedString(ConditionFactory.FILTER_CONTAINS), TextUtils.createTranslatedString(ConditionFactory.FILTER_EXIST), }; } public ComboBoxEditor getValueEditor(Object selectedProperty, NamedObject selectedCondition) { return null; } public ComboBoxModel getValuesForProperty(final Object property, NamedObject simpleCond) { final ListModel icons = Controller.getCurrentController().getMap().getIconRegistry().getIconsAsListModel(); final ExtendedComboBoxModel extendedComboBoxModel = new ExtendedComboBoxModel(); extendedComboBoxModel.setExtensionList(icons); return extendedComboBoxModel; } public boolean isCaseDependent(final Object property, final NamedObject simpleCond) { return false; } public boolean supportsApproximateMatching(final Object property, final NamedObject simpleCond) { return false; } public ASelectableCondition loadCondition(final XMLElement element) { if (element.getName().equalsIgnoreCase(IconContainedCondition.NAME)) { return IconContainedCondition.load(element); } if (element.getName().equalsIgnoreCase(IconExistsCondition.NAME)) { return IconExistsCondition.load(element); } return null; } public ListCellRenderer getValueRenderer(Object selectedProperty, NamedObject selectedCondition) { // don't return null as this would make FilterConditionEditor fall back to filterController.getConditionRenderer() // (and that would put in a default string like "No Filtering (remove)"!) return new DefaultConditionRenderer(""); } } >>>>>>> /* * Freeplane - mind map editor * Copyright (C) 2008 Dimitry Polivaev * * This file author is Dimitry Polivaev * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.freeplane.features.icon; import javax.swing.ComboBoxEditor; import javax.swing.ComboBoxModel; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListModel; import javax.swing.ListCellRenderer; import javax.swing.ListModel; import org.freeplane.core.resources.NamedObject; import org.freeplane.core.util.TextUtils; import org.freeplane.core.util.collection.ExtendedComboBoxModel; import org.freeplane.features.filter.condition.ASelectableCondition; import org.freeplane.features.filter.condition.ConditionFactory; import org.freeplane.features.filter.condition.DefaultConditionRenderer; import org.freeplane.features.filter.condition.IElementaryConditionController; import org.freeplane.features.mode.Controller; import org.freeplane.n3.nanoxml.XMLElement; /** * @author Dimitry Polivaev * 21.12.2008 */ class IconConditionController implements IElementaryConditionController { static final String FILTER_ICON = "filter_icon"; // // final private Controller controller; public IconConditionController() { super(); // this.controller = controller; } public boolean canEditValues(final Object property, final NamedObject simpleCond) { return false; } public boolean canHandle(final Object selectedItem) { if (!(selectedItem instanceof NamedObject)) { return false; } final NamedObject namedObject = (NamedObject) selectedItem; return namedObject.objectEquals(IconConditionController.FILTER_ICON); } public boolean canSelectValues(final Object property, final NamedObject simpleCond) { return !simpleCond.objectEquals(ConditionFactory.FILTER_EXIST); } public ASelectableCondition createCondition(final Object selectedItem, final NamedObject simpleCond, final Object value, final boolean matchCase, final boolean approximateMatching) { if (simpleCond.objectEquals(ConditionFactory.FILTER_CONTAINS)) return value instanceof UIIcon ? new IconContainedCondition(((UIIcon) value).getName()) : null; if (simpleCond.objectEquals(ConditionFactory.FILTER_EXIST)) return new IconExistsCondition(); return null; } public ComboBoxModel getConditionsForProperty(final Object property) { return new DefaultComboBoxModel(getIconConditionNames()); } public ListModel getFilteredProperties() { final DefaultListModel list = new DefaultListModel(); list.addElement(TextUtils.createTranslatedString(FILTER_ICON)); return list; } public Object[] getIconConditionNames() { return new NamedObject[] { TextUtils.createTranslatedString(ConditionFactory.FILTER_CONTAINS), TextUtils.createTranslatedString(ConditionFactory.FILTER_EXIST), }; } public ComboBoxEditor getValueEditor(Object selectedProperty, NamedObject selectedCondition) { return null; } public ComboBoxModel getValuesForProperty(final Object property, NamedObject simpleCond) { final ListModel icons = Controller.getCurrentController().getMap().getIconRegistry().getIconsAsListModel(); final ExtendedComboBoxModel extendedComboBoxModel = new ExtendedComboBoxModel(); extendedComboBoxModel.setExtensionList(icons); return extendedComboBoxModel; } public boolean isCaseDependent(final Object property, final NamedObject simpleCond) { return false; } public boolean supportsApproximateMatching(final Object property, final NamedObject simpleCond) { return false; } public ASelectableCondition loadCondition(final XMLElement element) { if (element.getName().equalsIgnoreCase(IconContainedCondition.NAME)) { return IconContainedCondition.load(element); } if (element.getName().equalsIgnoreCase(IconExistsCondition.NAME)) { return IconExistsCondition.load(element); } return null; } public ListCellRenderer getValueRenderer(Object selectedProperty, NamedObject selectedCondition) { // don't return null as this would make FilterConditionEditor fall back to filterController.getConditionRenderer() // (and that would put in a default string like "No Filtering (remove)"!) return new DefaultConditionRenderer("", true); } }
<<<<<<< // // final private Controller controller; private JScrollPane noteScrollPane; private JLabel noteViewer; ======= final private Controller controller; private JScrollPane noteScrollPane; private JEditorPane noteViewer; >>>>>>> private JScrollPane noteScrollPane; private JEditorPane noteViewer;
<<<<<<< final private LastOpenedMapsRibbonContributorFactory lastOpenedMapsRibbonContributorFactory; public LastOpenedMapsRibbonContributorFactory getLastOpenedMapsRibbonContributorFactory() { return lastOpenedMapsRibbonContributorFactory; } ======= private String mapSelectedOnStart; >>>>>>> final private LastOpenedMapsRibbonContributorFactory lastOpenedMapsRibbonContributorFactory; public LastOpenedMapsRibbonContributorFactory getLastOpenedMapsRibbonContributorFactory() { return lastOpenedMapsRibbonContributorFactory; } private String mapSelectedOnStart; <<<<<<< restoreList(LAST_OPENED, lastOpenedList); lastOpenedMapsRibbonContributorFactory = new LastOpenedMapsRibbonContributorFactory(this); ======= restoreList(LAST_OPENED); >>>>>>> restoreList(LAST_OPENED); lastOpenedMapsRibbonContributorFactory = new LastOpenedMapsRibbonContributorFactory(this); <<<<<<< public File createFileFromRestorable(StringTokenizer tokens) { String fileName = tokens.nextToken(";").substring(1); if (PORTABLE_APP && fileName.startsWith(":") && USER_DRIVE.endsWith(":")) { fileName = USER_DRIVE + fileName.substring(1); } File file = new File(fileName); return file; } public void openMapsOnStart() { if (!lastOpenedList.isEmpty()) { final String lastMap; lastMap = lastOpenedList.get(0); if(!tryToChangeToMapView(lastMap)) safeOpen(lastMap); ======= void openLastMapOnStart() { if (mapSelectedOnStart != null) { if(!tryToChangeToMapView(mapSelectedOnStart)) safeOpen(mapSelectedOnStart); >>>>>>> public File createFileFromRestorable(StringTokenizer tokens) { String fileName = tokens.nextToken(";").substring(1); if (PORTABLE_APP && fileName.startsWith(":") && USER_DRIVE.endsWith(":")) { fileName = USER_DRIVE + fileName.substring(1); } File file = new File(fileName); return file; } void openLastMapOnStart() { if (mapSelectedOnStart != null) { if(!tryToChangeToMapView(mapSelectedOnStart)) safeOpen(mapSelectedOnStart); <<<<<<< ======= final AFreeplaneAction lastOpenedActionListener = new OpenLastOpenedAction(i++, this); final IFreeplaneAction decoratedAction = menuBuilder.decorateAction(lastOpenedActionListener); final JMenuItem item = new JFreeplaneMenuItem(decoratedAction); item.setActionCommand(key); String text = createOpenMapItemName(key); item.setText(text); item.setMnemonic(0); menuBuilder.addMenuItem(MENU_CATEGORY, item, MENU_CATEGORY + '/' + lastOpenedActionListener.getKey(), UIBuilder.AS_CHILD); >>>>>>>
<<<<<<< try { if (newTheme.isDark()) { LafManager.getInstance().setCurrentLookAndFeel(new DarculaLookAndFeelInfo()); UIManager.setLookAndFeel(new MTLaf(newTheme)); } else { LafManager.getInstance().setCurrentLookAndFeel(new IntelliJLookAndFeelInfo()); UIManager.setLookAndFeel(new MTLightLaf(newTheme)); } JBColor.setDark(newTheme.isDark()); IconLoader.setUseDarkIcons(newTheme.isDark()); PropertiesComponent.getInstance().setValue(getSettingsPrefix() + ".theme", newTheme.name()); applyContrast(false); applyCompactSidebar(false); applyCustomTreeIndent(); applyAccents(false); setBoldTabs(); } catch (final UnsupportedLookAndFeelException e) { e.printStackTrace(); } ======= // UIManager.setLookAndFeel(new MTLaf(newTheme)); // JBColor.setDark(newTheme.isDark()); // IconLoader.setUseDarkIcons(newTheme.isDark()); newTheme.getTheme().activate(); PropertiesComponent.getInstance().setValue(getSettingsPrefix() + ".theme", newTheme.getId()); applyContrast(false); applyCompactSidebar(false); applyCustomTreeIndent(); applyAccents(false); setBoldTabs(); >>>>>>> newTheme.getTheme().activate(); PropertiesComponent.getInstance().setValue(getSettingsPrefix() + ".theme", newTheme.getId()); applyContrast(false); applyCompactSidebar(false); applyCustomTreeIndent(); applyAccents(false); setBoldTabs(); <<<<<<< if (mtTheme.isDark()) { LafManager.getInstance().setCurrentLookAndFeel(new DarculaLookAndFeelInfo()); UIManager.setLookAndFeel(new MTLaf(mtTheme)); } else { LafManager.getInstance().setCurrentLookAndFeel(new IntelliJLookAndFeelInfo()); UIManager.setLookAndFeel(new MTLightLaf(mtTheme)); } ======= UIManager.setLookAndFeel(new MTLaf(MTConfig.getInstance().getSelectedTheme().getTheme())); >>>>>>> UIManager.setLookAndFeel(new MTLaf(MTConfig.getInstance().getSelectedTheme().getTheme()));
<<<<<<< Menu file = new PopupMenu("File"); addSubMenu(file, "New"); ======= Menu file = getMenu("File"); Menu newMenu = getMenu("File>New", true); >>>>>>> Menu file = getMenu("File"); Menu newMenu = getMenu("File>New", true); <<<<<<< if (applet == null) addSubMenu(file, "Open Samples"); ======= getMenu("File>Open Samples", true); >>>>>>> if (applet == null) getMenu("File>Open Samples", true); <<<<<<< Menu edit = new PopupMenu("Edit"); ======= Menu edit = getMenu("Edit"); >>>>>>> Menu edit = getMenu("Edit"); <<<<<<< Menu image = new PopupMenu("Image"); Menu imageType = new Menu("Type"); ======= Menu image = getMenu("Image"); Menu imageType = getMenu("Image>Type"); >>>>>>> Menu image = getMenu("Image"); Menu imageType = getMenu("Image>Type"); <<<<<<< addSubMenu(image, "Color"); addSubMenu(image, "Stacks"); addSubMenu(image, "Hyperstacks"); ======= getMenu("Image>Color", true); getMenu("Image>Stacks", true); Menu hyperstacksMenu = getMenu("Image>Hyperstacks", true); >>>>>>> getMenu("Image>Color", true); getMenu("Image>Stacks", true); Menu hyperstacksMenu = getMenu("Image>Hyperstacks", true); <<<<<<< Menu process = new PopupMenu("Process"); ======= Menu process = getMenu("Process"); >>>>>>> Menu process = getMenu("Process"); <<<<<<< Menu help = new PopupMenu("Help"); ======= Menu help = getMenu("Help"); >>>>>>> Menu help = getMenu("Help"); <<<<<<< aboutMenu = addSubMenu(help, "About Plugins"); help.addSeparator(); addPlugInItem(help, "ImageJA Web Site...", "ij.plugin.BrowserLauncher", 0, false); addPlugInItem(help, "Online Docs...", "ij.plugin.BrowserLauncher(\"online\")", 0, false); addPlugInItem(help, "About ImageJA...", "ij.plugin.AboutBoxJA", 0, false); ======= Menu aboutMenu = getMenu("Help>About Plugins", true); addPlugInItem(help, "About ImageJ...", "ij.plugin.AboutBox", 0, false); >>>>>>> Menu aboutMenu = getMenu("Help>About Plugins", true); addPlugInItem(help, "About ImageJA...", "ij.plugin.AboutBoxJA", 0, false); <<<<<<< addPluginsMenu(); if (applet==null) { ======= if (applet==null) { menuSeparators = new Properties(); >>>>>>> if (applet==null) { menuSeparators = new Properties(); <<<<<<< mbar = new MenuBar(); if (fontSize!=0) mbar.setFont(getFont()); } else mbar = applet.menu.getMenuBar(); mbar.add(file); mbar.add(edit); mbar.add(image); mbar.add(process); mbar.add(analyze); mbar.add(pluginsMenu); mbar.add(window); mbar.setHelpMenu(help); if (ij!=null && applet == null) ======= } // make sure "Quit" is the last item in the File menu file.addSeparator(); addPlugInItem(file, "Quit", "ij.plugin.Commands(\"quit\")", 0, false); if (fontSize!=0) mbar.setFont(getFont()); if (ij!=null) >>>>>>> if (fontSize!=0) mbar.setFont(getFont()); } // make sure "Quit" is the last item in the File menu file.addSeparator(); addPlugInItem(file, "Quit", "ij.plugin.Commands(\"quit\")", 0, false); if (ij!=null && applet == null) <<<<<<< pluginsMenu = new PopupMenu("Plugins"); ======= Menu pluginsMenu = getMenu("Plugins"); >>>>>>> Menu pluginsMenu = getMenu("Plugins"); <<<<<<< installUserPlugin(className, false); } public static void installUserPlugin(String className, boolean force) { Menu menu = pluginsMenu; ======= installUserPlugin(className, false); } public void installUserPlugin(String className, boolean force) { >>>>>>> doInstallUserPlugin(className, false); } public static void installUserPlugin(String className, boolean force) { instance.doInstallUserPlugin(className, force); } void doInstallUserPlugin(String className, boolean force) { <<<<<<< if(force) addItemSorted(menu,item,0); else menu.add(item); ======= if(force) addItemSorted(menu,item,0); else addOrdered(menu, item); >>>>>>> if(force) addItemSorted(menu,item,0); else addOrdered(menu, item); <<<<<<< public static Menu getSaveAsMenu() { return saveAsMenu; } ======= public static Menu getSaveAsMenu() { return instance.getMenu("File>Save As"); } >>>>>>> public static Menu getSaveAsMenu() { return instance.getMenu("File>Save As"); } <<<<<<< shortcuts = new Hashtable(); pluginsPrefs = new Vector(); jarFiles = macroFiles = null; menusTable = null; Menus m = new Menus(IJ.getInstance(), (ImageJApplet)IJ.getApplet()); ======= Menus m = new Menus(IJ.getInstance(), IJ.getApplet()); >>>>>>> Menus m = new Menus(IJ.getInstance(), (ImageJApplet)IJ.getApplet());
<<<<<<< private static Menus instance; ======= >>>>>>> <<<<<<< private static ImageJApplet applet; private static Hashtable demoImagesTable = new Hashtable(); ======= private static Applet applet; private Hashtable demoImagesTable = new Hashtable(); >>>>>>> private static ImageJApplet applet; private Hashtable demoImagesTable = new Hashtable(); <<<<<<< Menu file = new PopupMenu("File"); addSubMenu(file, "New"); ======= shortcuts = new Hashtable(); pluginsPrefs = new Vector(); macroShortcuts = null; Menu file = getMenu("File"); Menu newMenu = getMenu("File>New", true); >>>>>>> shortcuts = new Hashtable(); pluginsPrefs = new Vector(); macroShortcuts = null; Menu file = getMenu("File"); Menu newMenu = getMenu("File>New", true); <<<<<<< if (applet == null) addSubMenu(file, "Open Samples"); ======= getMenu("File>Open Samples", true); >>>>>>> if (applet == null) getMenu("File>Open Samples", true); <<<<<<< Menu edit = new PopupMenu("Edit"); ======= Menu edit = getMenu("Edit"); >>>>>>> Menu edit = getMenu("Edit"); <<<<<<< Menu image = new PopupMenu("Image"); Menu imageType = new PopupMenu("Type"); ======= Menu image = getMenu("Image"); Menu imageType = getMenu("Image>Type"); >>>>>>> Menu image = getMenu("Image"); Menu imageType = getMenu("Image>Type"); <<<<<<< Menu process = new PopupMenu("Process"); ======= Menu process = getMenu("Process"); >>>>>>> Menu process = getMenu("Process"); <<<<<<< Menu help = new PopupMenu("Help"); ======= Menu help = getMenu("Help"); >>>>>>> Menu help = getMenu("Help"); <<<<<<< aboutMenu = addSubMenu(help, "About Plugins"); addPlugInItem(help, "About ImageJA...", "ij.plugin.AboutBoxJA", 0, false); ======= Menu aboutMenu = getMenu("Help>About Plugins", true); addPlugInItem(help, "About ImageJ...", "ij.plugin.AboutBox", 0, false); >>>>>>> Menu aboutMenu = getMenu("Help>About Plugins", true); addPlugInItem(help, "About ImageJA...", "ij.plugin.AboutBoxJA", 0, false); <<<<<<< addPluginsMenu(); if (applet==null) { ======= if (applet==null) { menuSeparators = new Properties(); >>>>>>> if (applet==null) { menuSeparators = new Properties(); <<<<<<< if (fontSize!=0) mbar.setFont(getFont()); mbar = new MenuBar(); } else mbar = applet.menu.getMenuBar(); ======= } // make sure "Quit" is the last item in the File menu file.addSeparator(); addPlugInItem(file, "Quit", "ij.plugin.Commands(\"quit\")", 0, false); >>>>>>> } // make sure "Quit" is the last item in the File menu file.addSeparator(); addPlugInItem(file, "Quit", "ij.plugin.Commands(\"quit\")", 0, false); <<<<<<< mbar.add(file); mbar.add(edit); mbar.add(image); mbar.add(process); mbar.add(analyze); mbar.add(pluginsMenu); mbar.add(window); mbar.setHelpMenu(help); if (ij!=null && applet == null) ======= if (ij!=null) >>>>>>> if (ij!=null && applet == null) <<<<<<< pluginsMenu = new PopupMenu("Plugins"); ======= //pluginsMenu = new Menu("Plugins"); pluginsMenu = getMenu("Plugins"); >>>>>>> //pluginsMenu = new Menu("Plugins"); pluginsMenu = getMenu("Plugins"); <<<<<<< installUserPlugin(className, false); } public static void installUserPlugin(String className, boolean force) { instance.doInstallUserPlugin(className, force); } public void doInstallUserPlugin(String className, boolean force) { Menu menu = pluginsMenu; ======= installUserPlugin(className, false); } public void installUserPlugin(String className, boolean force) { >>>>>>> installUserPlugin(className, false); } public void installUserPlugin(String className, boolean force) { <<<<<<< menusTable = null; Menus m = new Menus(IJ.getInstance(), (ImageJApplet)IJ.getApplet()); ======= Menus m = new Menus(IJ.getInstance(), IJ.getApplet()); >>>>>>> Menus m = new Menus(IJ.getInstance(), (ImageJApplet)IJ.getApplet());
<<<<<<< Button runButton; Button closeButton; Checkbox fullInfoCheckbox, fuzzyCheckbox, closeCheckbox; ======= Button runButton, closeButton, exportButton; Checkbox fullInfoCheckbox, closeCheckbox; >>>>>>> Button runButton, closeButton, exportButton; Checkbox fullInfoCheckbox, fuzzyCheckbox, closeCheckbox; <<<<<<< fuzzyCheckbox = new Checkbox("Fuzzy matching", false); fuzzyCheckbox.addItemListener(this); closeCheckbox = new Checkbox("Close when running", true); ======= closeCheckbox = new Checkbox("Close when running", closeWhenRunning); >>>>>>> fuzzyCheckbox = new Checkbox("Fuzzy matching", false); fuzzyCheckbox.addItemListener(this); closeCheckbox = new Checkbox("Close when running", closeWhenRunning);
<<<<<<< String path = IJ.getDirectory("luts")+cmd.command+".lut"; ======= String path = IJ.getDirectory("luts")+cmd+".lut"; >>>>>>> String path = IJ.getDirectory("luts")+cmd.command+".lut"; <<<<<<< if (f.exists()) { ======= if (f.exists()) { String dir = OpenDialog.getLastDirectory(); >>>>>>> if (f.exists()) { String dir = OpenDialog.getLastDirectory(); <<<<<<< notifyCommandListeners(cmd, CommandListenerPlus.CMD_LUT); } else IJ.error("Unrecognized command: " + cmd.command); ======= OpenDialog.setLastDirectory(dir); } else IJ.error("Unrecognized command: " + cmd); >>>>>>> notifyCommandListeners(cmd, CommandListenerPlus.CMD_LUT); OpenDialog.setLastDirectory(dir); } else IJ.error("Unrecognized command: " + cmd.command);
<<<<<<< hyperstacksMenu = addSubMenu(image, "HyperStacks"); ======= addSubMenu(image, "Hyperstacks"); >>>>>>> hyperstacksMenu = addSubMenu(image, "Hyperstacks");
<<<<<<< if (!changes && Menus.window.getItemCount()>Menus.WINDOW_MENU_ITEMS && !(IJ.macroRunning()&&WindowManager.getImageCount()==0)) { GenericDialog gd = new GenericDialog("ImageJA", this); gd.addMessage("Are you sure you want to quit ImageJA?"); ======= if (windowClosed && !changes && Menus.window.getItemCount()>Menus.WINDOW_MENU_ITEMS && !(IJ.macroRunning()&&WindowManager.getImageCount()==0)) { GenericDialog gd = new GenericDialog("ImageJ", this); gd.addMessage("Are you sure you want to quit ImageJ?"); >>>>>>> if (windowClosed && !changes && Menus.window.getItemCount()>Menus.WINDOW_MENU_ITEMS && !(IJ.macroRunning()&&WindowManager.getImageCount()==0)) { GenericDialog gd = new GenericDialog("ImageJA", this); gd.addMessage("Are you sure you want to quit ImageJA?");
<<<<<<< private static Menus instance; private MenuBar mbar; private CheckboxMenuItem gray8Item,gray16Item,gray32Item, ======= private static Menus instance; private static MenuBar mbar; private static CheckboxMenuItem gray8Item,gray16Item,gray32Item, >>>>>>> private static Menus instance; private static MenuBar mbar; private static CheckboxMenuItem gray8Item,gray16Item,gray32Item, <<<<<<< private boolean installingJars, duplicateCommand; private Vector jarFiles; // JAR files in plugins folder with "_" in their name private Map menuEntry2jarFile = new HashMap(); private Vector macroFiles; // Macro files in plugins folder with "_" in their name private int userPluginsIndex; // First user plugin or submenu in Plugins menu private boolean addSorted; private static int defaultFontSize = IJ.isWindows()?14:12; private int fontSize = Prefs.getInt(Prefs.MENU_SIZE, defaultFontSize); private Font menuFont; ======= private static boolean installingJars, duplicateCommand; private static Vector jarFiles; // JAR files in plugins folder with "_" in their name private Map menuEntry2jarFile = new HashMap(); private static Vector macroFiles; // Macro files in plugins folder with "_" in their name private static int userPluginsIndex; // First user plugin or submenu in Plugins menu private static boolean addSorted; private static int defaultFontSize = IJ.isWindows()?14:0; private static int fontSize = Prefs.getInt(Prefs.MENU_SIZE, defaultFontSize); private static Font menuFont; >>>>>>> private static boolean installingJars, duplicateCommand; private static Vector jarFiles; // JAR files in plugins folder with "_" in their name private Map menuEntry2jarFile = new HashMap(); private static Vector macroFiles; // Macro files in plugins folder with "_" in their name private static int userPluginsIndex; // First user plugin or submenu in Plugins menu private static boolean addSorted; private static int defaultFontSize = IJ.isWindows()?14:12; private static int fontSize = Prefs.getInt(Prefs.MENU_SIZE, defaultFontSize); private static Font menuFont; <<<<<<< String menuEntry = s; if (s.startsWith("\"")) { int quote = s.indexOf('"', 1); menuEntry = quote < 0 ? s.substring(1) : s.substring(1, quote); } else { int comma = s.indexOf(','); if (comma > 0) menuEntry = s.substring(0, comma); } ======= String menuEntry = s; if (s.startsWith("\"")) { int quote = s.indexOf('"', 1); menuEntry = quote<0?s.substring(1):s.substring(1, quote); } else { int comma = s.indexOf(','); if (comma > 0) menuEntry = s.substring(0, comma); } >>>>>>> String menuEntry = s; if (s.startsWith("\"")) { int quote = s.indexOf('"', 1); menuEntry = quote<0?s.substring(1):s.substring(1, quote); } else { int comma = s.indexOf(','); if (comma > 0) menuEntry = s.substring(0, comma); } <<<<<<< String jar2 = (String)menuEntry2jarFile.get(menuEntry); if (jar2 != null && jar2.startsWith(pluginsPath)) jar2 = jar2.substring(pluginsPath.length()); jarError += " Duplicate command: " + s + (jar2 != null ? " (already in " + jar2 + ")" : "") + "\n"; } else menuEntry2jarFile.put(menuEntry, jar); ======= String jar2 = (String)menuEntry2jarFile.get(menuEntry); if (jar2 != null && jar2.startsWith(pluginsPath)) jar2 = jar2.substring(pluginsPath.length()); jarError += " Duplicate command: " + s + (jar2 != null ? " (already in " + jar2 + ")" : "") + "\n"; } else menuEntry2jarFile.put(menuEntry, jar); >>>>>>> String jar2 = (String)menuEntry2jarFile.get(menuEntry); if (jar2 != null && jar2.startsWith(pluginsPath)) jar2 = jar2.substring(pluginsPath.length()); jarError += " Duplicate command: " + s + (jar2 != null ? " (already in " + jar2 + ")" : "") + "\n"; } else menuEntry2jarFile.put(menuEntry, jar);
<<<<<<< import ij.util.Levenshtein; ======= >>>>>>> import ij.util.Levenshtein; <<<<<<< JFrame d; JTextField prompt; JList completions; JScrollPane scrollPane; DefaultListModel completionsModel; JButton runButton, closeButton, exportButton; JCheckBox fullInfoCheckBox, fuzzyCheckBox, closeCheckBox; ======= JFrame d; JTextField prompt; JList completions; JScrollPane scrollPane; DefaultListModel completionsModel; JButton runButton, closeButton, exportButton; JCheckBox fullInfoCheckBox, closeCheckBox; >>>>>>> JFrame d; JTextField prompt; JList completions; JScrollPane scrollPane; DefaultListModel completionsModel; JButton runButton, closeButton, exportButton; JCheckBox fullInfoCheckBox, fuzzyCheckBox, closeCheckBox; <<<<<<< completionsModel.removeAllElements(); if (fuzzyCheckBox.isSelected()) { populateListFuzzily(substring, fullInfo); return; } ======= completionsModel.removeAllElements(); >>>>>>> completionsModel.removeAllElements(); if (fuzzyCheckBox.isSelected()) { populateListFuzzily(substring, fullInfo); return; } <<<<<<< private static class LevenshteinPair implements Comparable { int index, cost; LevenshteinPair(int index, int cost) { this.index = index; this.cost = cost; } public int compareTo(Object o) { return cost - ((LevenshteinPair)o).cost; } } protected void populateListFuzzily(String substring, boolean fullInfo) { Levenshtein levenshtein = new Levenshtein(0, 10, 1, 5, 0, 0); LevenshteinPair[] pairs = new LevenshteinPair[commands.length]; for (int i = 0; i < commands.length; i++) { int cost = levenshtein.cost(substring, commands[i].toLowerCase()); pairs[i] = new LevenshteinPair(i, cost); } Arrays.sort(pairs); for (int i = 0; i < pairs.length && i < 50; i++) { String name = commands[pairs[i].index]; CommandAction ca = (CommandAction)commandsHash.get(name); String listLabel = makeListLabel(name, ca, fullInfo); completionsModel.addElement(listLabel); } } ======= private static class LevenshteinPair implements Comparable { int index, cost; LevenshteinPair(int index, int cost) { this.index = index; this.cost = cost; } public int compareTo(Object o) { return cost - ((LevenshteinPair)o).cost; } } >>>>>>> private static class LevenshteinPair implements Comparable { int index, cost; LevenshteinPair(int index, int cost) { this.index = index; this.cost = cost; } public int compareTo(Object o) { return cost - ((LevenshteinPair)o).cost; } } protected void populateListFuzzily(String substring, boolean fullInfo) { Levenshtein levenshtein = new Levenshtein(0, 10, 1, 5, 0, 0); LevenshteinPair[] pairs = new LevenshteinPair[commands.length]; for (int i = 0; i < commands.length; i++) { int cost = levenshtein.cost(substring, commands[i].toLowerCase()); pairs[i] = new LevenshteinPair(i, cost); } Arrays.sort(pairs); for (int i = 0; i < pairs.length && i < 50; i++) { String name = commands[pairs[i].index]; CommandAction ca = (CommandAction)commandsHash.get(name); String listLabel = makeListLabel(name, ca, fullInfo); completionsModel.addElement(listLabel); } } <<<<<<< String[] list = (String [])completionsModel.toArray(); StringBuffer sb = new StringBuffer(2000); for (int i=0; i<list.length; i++) { ======= StringBuffer sb = new StringBuffer(5000); for (int i=0; i<completionsModel.size(); i++) { >>>>>>> String[] list = (String [])completionsModel.toArray(); StringBuffer sb = new StringBuffer(2000); for (int i=0; i<list.length; i++) { <<<<<<< fullInfoCheckBox = new JCheckBox("Show full information", false); fullInfoCheckBox.addItemListener(this); fuzzyCheckBox = new JCheckBox("Fuzzy matching", false); fuzzyCheckBox.addItemListener(this); closeCheckBox = new JCheckBox("Close when running", closeWhenRunning); closeCheckBox.addItemListener(this); ======= fullInfoCheckBox = new JCheckBox("Show full information", false); fullInfoCheckBox.addItemListener(this); closeCheckBox = new JCheckBox("Close when running", closeWhenRunning); closeCheckBox.addItemListener(this); >>>>>>> fullInfoCheckBox = new JCheckBox("Show full information", false); fullInfoCheckBox.addItemListener(this); fuzzyCheckBox = new JCheckBox("Fuzzy matching", false); fuzzyCheckBox.addItemListener(this); closeCheckBox = new JCheckBox("Close when running", closeWhenRunning); closeCheckBox.addItemListener(this); <<<<<<< JPanel optionsPanel = new JPanel(); optionsPanel.add(fullInfoCheckBox); optionsPanel.add(fuzzyCheckBox); optionsPanel.add(closeCheckBox); ======= JPanel optionsPanel = new JPanel(); optionsPanel.add(fullInfoCheckBox); optionsPanel.add(closeCheckBox); >>>>>>> JPanel optionsPanel = new JPanel(); optionsPanel.add(fullInfoCheckBox); optionsPanel.add(fuzzyCheckBox); optionsPanel.add(closeCheckBox);
<<<<<<< gd.addCheckbox("Run single instance listener", Prefs.enableRMIListener != 0); //if (IJ.isWindows()) // gd.addCheckbox("Disable DirecDraw", Prefs.disableDirectDraw); ======= gd.addCheckbox("Run single instance listener", Prefs.runSocketListener); >>>>>>> gd.addCheckbox("Run single instance listener", Prefs.enableRMIListener != 0);
<<<<<<< if (!changes && Menus.window.getItemCount()>Menus.WINDOW_MENU_ITEMS && !(IJ.macroRunning()&&WindowManager.getImageCount()==0)) { GenericDialog gd = new GenericDialog(getTitle(), this); gd.addMessage("Are you sure you want to quit " + getTitle() + "?"); ======= if (windowClosed && !changes && Menus.window.getItemCount()>Menus.WINDOW_MENU_ITEMS && !(IJ.macroRunning()&&WindowManager.getImageCount()==0)) { GenericDialog gd = new GenericDialog("ImageJA", this); gd.addMessage("Are you sure you want to quit ImageJA?"); >>>>>>> if (windowClosed && !changes && Menus.window.getItemCount()>Menus.WINDOW_MENU_ITEMS && !(IJ.macroRunning()&&WindowManager.getImageCount()==0)) { GenericDialog gd = new GenericDialog(getTitle(), this); gd.addMessage("Are you sure you want to quit " + getTitle() + "?");
<<<<<<< private ImageJApplet applet; private Hashtable demoImagesTable = new Hashtable(); private String pluginsPath, macrosPath; private Properties menus = new Properties(); private Properties menuSeparators; static Menu window, openRecentMenu, pluginsMenu, shortcutsMenu, utilitiesMenu, macrosMenu; private Hashtable pluginsTable; ======= private static Applet applet; private static Hashtable demoImagesTable = new Hashtable(); private static String pluginsPath, macrosPath; private static Menu pluginsMenu, importMenu, saveAsMenu, shortcutsMenu, aboutMenu, filtersMenu, toolsMenu, utilitiesMenu, macrosMenu, optionsMenu; private static Hashtable pluginsTable; >>>>>>> private static ImageJApplet applet; private static Hashtable demoImagesTable = new Hashtable(); private static String pluginsPath, macrosPath; private static Menu pluginsMenu, importMenu, saveAsMenu, shortcutsMenu, aboutMenu, filtersMenu, toolsMenu, utilitiesMenu, macrosMenu, optionsMenu; private static Hashtable pluginsTable; <<<<<<< if (applet == null) getMenu("File>Open Samples", true); ======= addSubMenu(file, "Open Samples"); >>>>>>> if (applet == null) addSubMenu(file, "Open Samples"); <<<<<<< Menu aboutMenu = getMenu("Help>About Plugins", true); addPlugInItem(help, "About ImageJA...", "ij.plugin.AboutBoxJA", 0, false); ======= aboutMenu = addSubMenu(help, "About Plugins"); addPlugInItem(help, "About ImageJ...", "ij.plugin.AboutBox", 0, false); >>>>>>> aboutMenu = addSubMenu(help, "About Plugins"); addPlugInItem(help, "About ImageJA...", "ij.plugin.AboutBoxJA", 0, false); <<<<<<< if (fontSize!=0) mbar.setFont(getFont()); } // make sure "Quit" is the last item in the File menu file.addSeparator(); addPlugInItem(file, "Quit", "ij.plugin.Commands(\"quit\")", 0, false); if (ij!=null && applet == null) ======= mbar = new MenuBar(); if (fontSize!=0) mbar.setFont(getFont()); mbar.add(file); mbar.add(edit); mbar.add(image); mbar.add(process); mbar.add(analyze); mbar.add(pluginsMenu); mbar.add(window); mbar.setHelpMenu(help); if (ij!=null) >>>>>>> if (fontSize!=0) mbar.setFont(getFont()); } mbar = new MenuBar(); if (fontSize!=0) mbar.setFont(getFont()); mbar.add(file); mbar.add(edit); mbar.add(image); mbar.add(process); mbar.add(analyze); mbar.add(pluginsMenu); mbar.add(window); mbar.setHelpMenu(help); if (ij!=null && applet == null) <<<<<<< private Menu getMenu(String menuName) { return getMenu(menuName, false); } private Menu getMenu(String menuName, boolean readFromProps) { if (menuName.endsWith(">")) menuName = menuName.substring(0, menuName.length() - 1); Menu result = (Menu)menus.get(menuName); if (result == null) { int offset = menuName.lastIndexOf('>'); if (offset < 0) { result = new PopupMenu(menuName); if (mbar == null) { if (applet == null) mbar = new MenuBar(); else mbar = applet.menu.getMenuBar(); } if (menuName.equals("Help")) mbar.setHelpMenu(result); else mbar.add(result); if (menuName.equals("Window")) window = result; else if (menuName.equals("Plugins")) pluginsMenu = result; } else { String parentName = menuName.substring(0, offset); String menuItemName = menuName.substring(offset + 1); Menu parentMenu = getMenu(parentName); result = new Menu(menuItemName); addPluginSeparatorIfNeeded(parentMenu); if (readFromProps) result = addSubMenu(parentMenu, menuItemName); else if (parentName.startsWith("Plugins") && menuSeparators != null) addItemSorted(parentMenu, result, parentName.equals("Plugins") ? userPluginsIndex : 0); else parentMenu.add(result); if (menuName.equals("File>Open Recent")) openRecentMenu = result; } menus.put(menuName, result); } return result; } ======= >>>>>>> <<<<<<< doInstallUserPlugin(className, false); } public static void installUserPlugin(String className, boolean force) { instance.doInstallUserPlugin(className, force); } void doInstallUserPlugin(String className, boolean force) { ======= Menu menu = pluginsMenu; >>>>>>> installUserPlugin(className, false); } public static void installUserPlugin(String className, boolean force) { instance.doInstallUserPlugin(className, force); } public void doInstallUserPlugin(String className, boolean force) { Menu menu = pluginsMenu; <<<<<<< Menus m = new Menus(IJ.getInstance(), (ImageJApplet)IJ.getApplet()); ======= shortcuts = new Hashtable(); pluginsPrefs = new Vector(); jarFiles = macroFiles = null; menusTable = null; Menus m = new Menus(IJ.getInstance(), IJ.getApplet()); >>>>>>> shortcuts = new Hashtable(); pluginsPrefs = new Vector(); jarFiles = macroFiles = null; menusTable = null; Menus m = new Menus(IJ.getInstance(), (ImageJApplet)IJ.getApplet());
<<<<<<< {IJ.noImage(); return;} write(this, path); ======= {IJ.noImage(); return;} try { writeImage(imp, path); } catch (Exception e) { String msg = e.getMessage(); if (msg==null || msg.equals("")) msg = ""+e; IJ.error("BMP Writer", "An error occured writing the file.\n \n" + msg); } IJ.showProgress(1); IJ.showStatus(""); >>>>>>> {IJ.noImage(); return;} try { write(this, path); } catch (Exception e) { String msg = e.getMessage(); if (msg==null || msg.equals("")) msg = ""+e; IJ.error("BMP Writer", "An error occured writing the file.\n \n" + msg); } IJ.showProgress(1); IJ.showStatus("");
<<<<<<< spiceServiceListenerNotifier.notifyObserversOfRequestSuccess(request); requestListenerNotifier.notifyListenersOfRequestSuccess(request, result, listeners); notifyOfRequestProcessed(request); ======= requestProgressReporter.notifyListenersOfRequestSuccess(request, result, listeners); notifyOfRequestProcessed(request, listeners); >>>>>>> spiceServiceListenerNotifier.notifyObserversOfRequestSuccess(request); requestListenerNotifier.notifyListenersOfRequestSuccess(request, result, listeners); notifyOfRequestProcessed(request, listeners); <<<<<<< spiceServiceListenerNotifier.notifyObserversOfRequestFailure(request); requestListenerNotifier.notifyListenersOfRequestFailure(request, e, listeners); notifyOfRequestProcessed(request); ======= requestProgressReporter.notifyListenersOfRequestFailure(request, e, listeners); notifyOfRequestProcessed(request, listeners); >>>>>>> spiceServiceListenerNotifier.notifyObserversOfRequestFailure(request); requestListenerNotifier.notifyListenersOfRequestFailure(request, e, listeners); notifyOfRequestProcessed(request, listeners); <<<<<<< spiceServiceListenerNotifier.notifyObserversOfRequestCancellation(request); requestListenerNotifier.notifyListenersOfRequestCancellation(request, listeners); notifyOfRequestProcessed(request); ======= requestProgressReporter.notifyListenersOfRequestCancellation(request, listeners); notifyOfRequestProcessed(request, listeners); >>>>>>> spiceServiceListenerNotifier.notifyObserversOfRequestCancellation(request); requestListenerNotifier.notifyListenersOfRequestCancellation(request, listeners); notifyOfRequestProcessed(request, listeners);
<<<<<<< ======= private static final String leaseException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException"; private static final long MAX_SLEEP_INTERVAL_MS = 16000L; >>>>>>> <<<<<<< private Configuration conf = null; private Storage storage = null; private long sleepIntervalMs = WALConstants.INITIAL_SLEEP_INTERVAL_MS; ======= private HdfsSinkConnectorConfig conf = null; private HdfsStorage storage = null; >>>>>>> private HdfsSinkConnectorConfig conf = null; private HdfsStorage storage = null; private long sleepIntervalMs = WALConstants.INITIAL_SLEEP_INTERVAL_MS; <<<<<<< log.error("Error appending WAL file: {}, {}", logFile, e); close(); throw new ConnectException(e); ======= throw new DataException(e); >>>>>>> log.error("Error appending WAL file: {}, {}", logFile, e); close(); throw new DataException(e); <<<<<<< while (sleepIntervalMs < WALConstants.MAX_SLEEP_INTERVAL_MS) { ======= long sleepIntervalMs = 1000L; while (sleepIntervalMs < MAX_SLEEP_INTERVAL_MS) { >>>>>>> while (sleepIntervalMs < WALConstants.MAX_SLEEP_INTERVAL_MS) { <<<<<<< log.error("Error applying WAL file: {}, {}", logFile, e); close(); throw new ConnectException(e); ======= throw new DataException(e); >>>>>>> log.error("Error applying WAL file: {}, {}", logFile, e); close(); throw new DataException(e); <<<<<<< try { String oldLogFile = logFile + ".1"; storage.delete(oldLogFile); storage.commit(logFile, oldLogFile); } catch (IOException e) { throw new ConnectException(e); } finally { close(); } ======= String oldLogFile = logFile + ".1"; storage.delete(oldLogFile); storage.commit(logFile, oldLogFile); // Clean out references to the current WAL file. // Open a new one on the next lease acquisition. close(); >>>>>>> try { String oldLogFile = logFile + ".1"; storage.delete(oldLogFile); storage.commit(logFile, oldLogFile); } finally { close(); } <<<<<<< throw new ConnectException("Error closing " + logFile, e); } finally { writer = null; reader = null; ======= throw new DataException("Error closing " + logFile, e); >>>>>>> throw new DataException("Error closing " + logFile, e); } finally { writer = null; reader = null;
<<<<<<< import java.util.ArrayList; import java.util.Collections; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; ======= import io.confluent.connect.hdfs.parquet.ParquetFormat; import io.confluent.connect.hdfs.string.StringFormat; >>>>>>> import java.util.ArrayList; import java.util.Collections; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import io.confluent.connect.hdfs.parquet.ParquetFormat; import io.confluent.connect.hdfs.string.StringFormat;
<<<<<<< public List<TransferEventResponse> getTransferEvents(TransactionReceipt transactionReceipt) { List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(TRANSFER_EVENT, transactionReceipt); ArrayList<TransferEventResponse> responses = new ArrayList<TransferEventResponse>(valueList.size()); for (Contract.EventValuesWithLog eventValues : valueList) { TransferEventResponse typedResponse = new TransferEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse._from = (String) eventValues.getIndexedValues().get(0).getValue(); typedResponse._to = (String) eventValues.getIndexedValues().get(1).getValue(); typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; } public Flowable<TransferEventResponse> transferEventObservable(EthFilter filter) { return web3j.ethLogObservable(filter).map(log -> { EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log); TransferEventResponse typedResponse = new TransferEventResponse(); typedResponse.log = log; typedResponse._from = (String) eventValues.getIndexedValues().get(0).getValue(); typedResponse._to = (String) eventValues.getIndexedValues().get(1).getValue(); typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); return typedResponse; }); } public Flowable<TransferEventResponse> transferEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) { EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress()); filter.addSingleTopic(EventEncoder.encode(TRANSFER_EVENT)); return transferEventObservable(filter); } public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) { List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(APPROVAL_EVENT, transactionReceipt); ArrayList<ApprovalEventResponse> responses = new ArrayList<ApprovalEventResponse>(valueList.size()); for (Contract.EventValuesWithLog eventValues : valueList) { ApprovalEventResponse typedResponse = new ApprovalEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue(); typedResponse._spender = (String) eventValues.getIndexedValues().get(1).getValue(); typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); responses.add(typedResponse); } return responses; } public Flowable<ApprovalEventResponse> approvalEventObservable(EthFilter filter) { return web3j.ethLogObservable(filter).map(log -> { EventValuesWithLog eventValues = extractEventParametersWithLog(APPROVAL_EVENT, log); ApprovalEventResponse typedResponse = new ApprovalEventResponse(); typedResponse.log = log; typedResponse._owner = (String) eventValues.getIndexedValues().get(0).getValue(); typedResponse._spender = (String) eventValues.getIndexedValues().get(1).getValue(); typedResponse._value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); return typedResponse; }); } public Flowable<ApprovalEventResponse> approvalEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) { EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress()); filter.addSingleTopic(EventEncoder.encode(APPROVAL_EVENT)); return approvalEventObservable(filter); } ======= >>>>>>>
<<<<<<< + " org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(\n" + " FUNC_FUNCTIONNAME, \n" ======= + " final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(\n" + " \"functionName\", \n" >>>>>>> + " final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(\n" + " FUNC_FUNCTIONNAME, \n" <<<<<<< + " org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(\n" + " FUNC_FUNCTIONNAME, \n" ======= + " final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(\n" + " \"functionName\", \n" >>>>>>> + " final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(\n" + " FUNC_FUNCTIONNAME, \n" <<<<<<< + " org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC_FUNCTIONNAME, \n" ======= + " final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(\"functionName\", \n" >>>>>>> + " final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC_FUNCTIONNAME, \n" <<<<<<< + " org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC_FUNCTIONNAME, \n" ======= + " final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(\"functionName\", \n" >>>>>>> + " final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC_FUNCTIONNAME, \n"
<<<<<<< public static class DurationSerializer extends ImmutableSerializer<Duration> { ======= static public class DurationSerializer extends ImmutableSerializer<Duration> { @Override >>>>>>> public static class DurationSerializer extends ImmutableSerializer<Duration> { @Override <<<<<<< public static class InstantSerializer extends ImmutableSerializer<Instant> { ======= static public class InstantSerializer extends ImmutableSerializer<Instant> { @Override >>>>>>> public static class InstantSerializer extends ImmutableSerializer<Instant> { @Override <<<<<<< public static class LocalDateSerializer extends ImmutableSerializer<LocalDate> { ======= static public class LocalDateSerializer extends ImmutableSerializer<LocalDate> { @Override >>>>>>> public static class LocalDateSerializer extends ImmutableSerializer<LocalDate> { @Override <<<<<<< public static class LocalDateTimeSerializer extends ImmutableSerializer<LocalDateTime> { ======= static public class LocalDateTimeSerializer extends ImmutableSerializer<LocalDateTime> { @Override >>>>>>> public static class LocalDateTimeSerializer extends ImmutableSerializer<LocalDateTime> { @Override <<<<<<< public static class LocalTimeSerializer extends ImmutableSerializer<LocalTime> { ======= static public class LocalTimeSerializer extends ImmutableSerializer<LocalTime> { @Override >>>>>>> public static class LocalTimeSerializer extends ImmutableSerializer<LocalTime> { @Override <<<<<<< public static class ZoneOffsetSerializer extends ImmutableSerializer<ZoneOffset> { ======= static public class ZoneOffsetSerializer extends ImmutableSerializer<ZoneOffset> { @Override >>>>>>> public static class ZoneOffsetSerializer extends ImmutableSerializer<ZoneOffset> { @Override <<<<<<< public static class ZoneIdSerializer extends ImmutableSerializer<ZoneId> { ======= static public class ZoneIdSerializer extends ImmutableSerializer<ZoneId> { @Override >>>>>>> public static class ZoneIdSerializer extends ImmutableSerializer<ZoneId> { @Override <<<<<<< public static class OffsetTimeSerializer extends ImmutableSerializer<OffsetTime> { ======= static public class OffsetTimeSerializer extends ImmutableSerializer<OffsetTime> { @Override >>>>>>> public static class OffsetTimeSerializer extends ImmutableSerializer<OffsetTime> { @Override <<<<<<< public static class OffsetDateTimeSerializer extends ImmutableSerializer<OffsetDateTime> { ======= static public class OffsetDateTimeSerializer extends ImmutableSerializer<OffsetDateTime> { @Override >>>>>>> public static class OffsetDateTimeSerializer extends ImmutableSerializer<OffsetDateTime> { @Override <<<<<<< public static class ZonedDateTimeSerializer extends ImmutableSerializer<ZonedDateTime> { ======= static public class ZonedDateTimeSerializer extends ImmutableSerializer<ZonedDateTime> { @Override >>>>>>> public static class ZonedDateTimeSerializer extends ImmutableSerializer<ZonedDateTime> { @Override <<<<<<< public static class YearSerializer extends ImmutableSerializer<Year> { ======= static public class YearSerializer extends ImmutableSerializer<Year> { @Override >>>>>>> public static class YearSerializer extends ImmutableSerializer<Year> { @Override <<<<<<< public static class YearMonthSerializer extends ImmutableSerializer<YearMonth> { ======= static public class YearMonthSerializer extends ImmutableSerializer<YearMonth> { @Override >>>>>>> public static class YearMonthSerializer extends ImmutableSerializer<YearMonth> { @Override <<<<<<< public static class MonthDaySerializer extends ImmutableSerializer<MonthDay> { ======= static public class MonthDaySerializer extends ImmutableSerializer<MonthDay> { @Override >>>>>>> public static class MonthDaySerializer extends ImmutableSerializer<MonthDay> { @Override <<<<<<< public static class PeriodSerializer extends ImmutableSerializer<Period> { ======= static public class PeriodSerializer extends ImmutableSerializer<Period> { @Override >>>>>>> public static class PeriodSerializer extends ImmutableSerializer<Period> { @Override
<<<<<<< public static class VoidSerializer extends ImmutableSerializer { ======= static public class VoidSerializer extends ImmutableSerializer { @Override >>>>>>> public static class VoidSerializer extends ImmutableSerializer { @Override <<<<<<< public static class BooleanSerializer extends ImmutableSerializer<Boolean> { ======= static public class BooleanSerializer extends ImmutableSerializer<Boolean> { @Override >>>>>>> public static class BooleanSerializer extends ImmutableSerializer<Boolean> { @Override <<<<<<< public static class ByteSerializer extends ImmutableSerializer<Byte> { ======= static public class ByteSerializer extends ImmutableSerializer<Byte> { @Override >>>>>>> public static class ByteSerializer extends ImmutableSerializer<Byte> { @Override <<<<<<< public static class CharSerializer extends ImmutableSerializer<Character> { ======= static public class CharSerializer extends ImmutableSerializer<Character> { @Override >>>>>>> public static class CharSerializer extends ImmutableSerializer<Character> { @Override <<<<<<< public static class ShortSerializer extends ImmutableSerializer<Short> { ======= static public class ShortSerializer extends ImmutableSerializer<Short> { @Override >>>>>>> public static class ShortSerializer extends ImmutableSerializer<Short> { @Override <<<<<<< public static class IntSerializer extends ImmutableSerializer<Integer> { ======= static public class IntSerializer extends ImmutableSerializer<Integer> { @Override >>>>>>> public static class IntSerializer extends ImmutableSerializer<Integer> { @Override <<<<<<< public static class LongSerializer extends ImmutableSerializer<Long> { ======= static public class LongSerializer extends ImmutableSerializer<Long> { @Override >>>>>>> public static class LongSerializer extends ImmutableSerializer<Long> { @Override <<<<<<< public static class FloatSerializer extends ImmutableSerializer<Float> { ======= static public class FloatSerializer extends ImmutableSerializer<Float> { @Override >>>>>>> public static class FloatSerializer extends ImmutableSerializer<Float> { @Override <<<<<<< public static class DoubleSerializer extends ImmutableSerializer<Double> { ======= static public class DoubleSerializer extends ImmutableSerializer<Double> { @Override >>>>>>> public static class DoubleSerializer extends ImmutableSerializer<Double> { @Override <<<<<<< public static class EnumSetSerializer extends Serializer<EnumSet> { ======= static public class EnumSetSerializer extends Serializer<EnumSet> { @Override >>>>>>> public static class EnumSetSerializer extends Serializer<EnumSet> { @Override <<<<<<< public static class KryoSerializableSerializer extends Serializer<KryoSerializable> { ======= static public class KryoSerializableSerializer extends Serializer<KryoSerializable> { @Override >>>>>>> public static class KryoSerializableSerializer extends Serializer<KryoSerializable> { @Override <<<<<<< public static class CollectionsEmptyListSerializer extends ImmutableSerializer<Collection> { ======= static public class CollectionsEmptyListSerializer extends ImmutableSerializer<Collection> { @Override >>>>>>> public static class CollectionsEmptyListSerializer extends ImmutableSerializer<Collection> { @Override <<<<<<< public static class CollectionsEmptyMapSerializer extends ImmutableSerializer<Map> { ======= static public class CollectionsEmptyMapSerializer extends ImmutableSerializer<Map> { @Override >>>>>>> public static class CollectionsEmptyMapSerializer extends ImmutableSerializer<Map> { @Override <<<<<<< public static class CollectionsEmptySetSerializer extends ImmutableSerializer<Set> { ======= static public class CollectionsEmptySetSerializer extends ImmutableSerializer<Set> { @Override >>>>>>> public static class CollectionsEmptySetSerializer extends ImmutableSerializer<Set> { @Override <<<<<<< public static class CollectionsSingletonListSerializer extends Serializer<List> { ======= static public class CollectionsSingletonListSerializer extends Serializer<List> { @Override >>>>>>> public static class CollectionsSingletonListSerializer extends Serializer<List> { @Override <<<<<<< public static class CollectionsSingletonMapSerializer extends Serializer<Map> { ======= static public class CollectionsSingletonMapSerializer extends Serializer<Map> { @Override >>>>>>> public static class CollectionsSingletonMapSerializer extends Serializer<Map> { @Override <<<<<<< public static class CollectionsSingletonSetSerializer extends Serializer<Set> { ======= static public class CollectionsSingletonSetSerializer extends Serializer<Set> { @Override >>>>>>> public static class CollectionsSingletonSetSerializer extends Serializer<Set> { @Override <<<<<<< public static class TimeZoneSerializer extends ImmutableSerializer<TimeZone> { ======= static public class TimeZoneSerializer extends ImmutableSerializer<TimeZone> { @Override >>>>>>> public static class TimeZoneSerializer extends ImmutableSerializer<TimeZone> { @Override <<<<<<< public static class TreeMapSerializer extends MapSerializer<TreeMap> { ======= static public class TreeMapSerializer extends MapSerializer<TreeMap> { @Override >>>>>>> public static class TreeMapSerializer extends MapSerializer<TreeMap> { @Override <<<<<<< public static class TreeSetSerializer extends CollectionSerializer<TreeSet> { ======= static public class TreeSetSerializer extends CollectionSerializer<TreeSet> { @Override >>>>>>> public static class TreeSetSerializer extends CollectionSerializer<TreeSet> { @Override <<<<<<< public static class PriorityQueueSerializer extends CollectionSerializer<PriorityQueue> { ======= static public class PriorityQueueSerializer extends CollectionSerializer<PriorityQueue> { @Override >>>>>>> public static class PriorityQueueSerializer extends CollectionSerializer<PriorityQueue> { @Override <<<<<<< public static class CharsetSerializer extends ImmutableSerializer<Charset> { ======= static public class CharsetSerializer extends ImmutableSerializer<Charset> { @Override >>>>>>> public static class CharsetSerializer extends ImmutableSerializer<Charset> { @Override <<<<<<< public static class URLSerializer extends ImmutableSerializer<URL> { ======= static public class URLSerializer extends ImmutableSerializer<URL> { @Override >>>>>>> public static class URLSerializer extends ImmutableSerializer<URL> { @Override <<<<<<< public static class ArraysAsListSerializer extends CollectionSerializer<List> { ======= static public class ArraysAsListSerializer extends CollectionSerializer<List> { @Override >>>>>>> public static class ArraysAsListSerializer extends CollectionSerializer<List> { @Override <<<<<<< public static class BitSetSerializer extends Serializer<BitSet> { ======= static public class BitSetSerializer extends Serializer<BitSet> { @Override >>>>>>> public static class BitSetSerializer extends Serializer<BitSet> { @Override
<<<<<<< // Game Dev public static final String LEVEL = "Storage/Game/Maps/tiledMap.dat"; ======= >>>>>>> // Game Dev public static final String LEVEL = "Storage/Game/Maps/tiledMap.dat"; <<<<<<< //Util.convertTiledLevel("tiledmap.json"); ======= Audio.setGainBGM(-6); // TODO Audio.setGainSFX(-6); // TODO >>>>>>> Audio.setGainBGM(-6); // TODO Audio.setGainSFX(-6); // TODO
<<<<<<< // Default image image = Tileset.getTile("MIRROR_BOX"); ======= id = "MIRROR_BOX"; image = applet.gameGraphics.get("MIRROR_BOX"); >>>>>>> id = "MIRROR_BOX"; image = Tileset.getTile("MIRROR_BOX"); <<<<<<< if (!rotating) { if (activated) { image = Tileset.getTile(352, 160, 16, 16); //TODO: add to tileset } else { image = Tileset.getTile("MIRROR_BOX"); } ======= } setMirrorDirection(); } public void activateMirrorBox() { if (!rotating) { if (activated) { image = applet.gameGraphics.g(352, 160, 16, 16); } else { image = applet.gameGraphics.get("MIRROR_BOX"); >>>>>>> } setMirrorDirection(); } public void activateMirrorBox() { if (!rotating) { if (activated) { image = Tileset.getTile(352, 160, 16, 16); //TODO: add to tileset } else { image = Tileset.getTile("MIRROR_BOX");
<<<<<<< import sidescroller.SideScroller.debugType; ======= import sidescroller.Tileset; >>>>>>> import sidescroller.SideScroller.debugType; import sidescroller.Tileset;
<<<<<<< ======= import com.artipie.http.auth.Authentication; import io.vertx.reactivex.core.Vertx; >>>>>>> import com.artipie.http.auth.Authentication;
<<<<<<< import java.io.BufferedReader; import java.io.BufferedOutputStream; ======= import java.io.BufferedWriter; import java.io.OutputStreamWriter; >>>>>>> import java.io.BufferedOutputStream;
<<<<<<< new YamlPermissions(new File(RpPermissionsTest.CONF_YAML)), new AllOf<YamlPermissions>( new ListOf<org.hamcrest.Matcher<? super YamlPermissions>>( new MatcherOf<>(new ProcOf<>(perm -> perm.allowed(uname, "delete"))), new MatcherOf<>(new ProcOf<>(perm -> perm.allowed(uname, "deploy"))), new MatcherOf<>(new ProcOf<>(perm -> perm.allowed(uname, "download"))), new MatcherOf<>(new ProcOf<>(perm -> !perm.allowed(uname, "install"))) ======= new RpPermissions(new File(RpPermissionsTest.CONF_YAML)), new AllOf<RpPermissions>( new ListOf<org.hamcrest.Matcher<? super RpPermissions>>( new MatcherOf<>(perm -> { return perm.allowed(uname, "delete"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "deploy"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "download"); }), new MatcherOf<>(perm -> !perm.allowed(uname, "install")) >>>>>>> new YamlPermissions(new File(RpPermissionsTest.CONF_YAML)), new AllOf<YamlPermissions>( new ListOf<org.hamcrest.Matcher<? super YamlPermissions>>( new MatcherOf<>(perm -> { return perm.allowed(uname, "delete"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "deploy"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "download"); }), new MatcherOf<>(perm -> !perm.allowed(uname, "install")) <<<<<<< new YamlPermissions(new File(RpPermissionsTest.CONF_YAML)), new AllOf<YamlPermissions>( new ListOf<org.hamcrest.Matcher<? super YamlPermissions>>( new MatcherOf<>(new ProcOf<>(perm -> perm.allowed(uname, "deploy"))), new MatcherOf<>(new ProcOf<>(perm -> perm.allowed(uname, "download"))), new MatcherOf<>(new ProcOf<>(perm -> !perm.allowed(uname, "install"))), new MatcherOf<>(new ProcOf<>(perm -> !perm.allowed(uname, "update"))) ======= new RpPermissions(new File(RpPermissionsTest.CONF_YAML)), new AllOf<RpPermissions>( new ListOf<org.hamcrest.Matcher<? super RpPermissions>>( new MatcherOf<>(perm -> { return perm.allowed(uname, "deploy"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "download"); }), new MatcherOf<>(perm -> !perm.allowed(uname, "install")), new MatcherOf<>(perm -> !perm.allowed(uname, "update")) >>>>>>> new YamlPermissions(new File(RpPermissionsTest.CONF_YAML)), new AllOf<YamlPermissions>( new ListOf<org.hamcrest.Matcher<? super YamlPermissions>>( new MatcherOf<>(perm -> { return perm.allowed(uname, "deploy"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "download"); }), new MatcherOf<>(perm -> !perm.allowed(uname, "install")), new MatcherOf<>(perm -> !perm.allowed(uname, "update")) <<<<<<< new YamlPermissions(new File(RpPermissionsTest.CONF_YAML)), new AllOf<YamlPermissions>( new ListOf<org.hamcrest.Matcher<? super YamlPermissions>>( new MatcherOf<>(new ProcOf<>(perm -> perm.allowed(uname, "delete"))), new MatcherOf<>(new ProcOf<>(perm -> perm.allowed(uname, "deploy"))), new MatcherOf<>(new ProcOf<>(perm -> perm.allowed(uname, "download"))), new MatcherOf<>(new ProcOf<>(perm -> perm.allowed(uname, "install"))) ======= new RpPermissions(new File(RpPermissionsTest.CONF_YAML)), new AllOf<RpPermissions>( new ListOf<org.hamcrest.Matcher<? super RpPermissions>>( new MatcherOf<>(perm -> { return perm.allowed(uname, "delete"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "deploy"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "download"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "install"); }) >>>>>>> new YamlPermissions(new File(RpPermissionsTest.CONF_YAML)), new AllOf<YamlPermissions>( new ListOf<org.hamcrest.Matcher<? super YamlPermissions>>( new MatcherOf<>(perm -> { return perm.allowed(uname, "delete"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "deploy"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "download"); }), new MatcherOf<>(perm -> { return perm.allowed(uname, "install"); })
<<<<<<< ======= // swuser.getAuthorities().forEach(auth -> { // user.getPrivileges().add(auth); // }); >>>>>>> <<<<<<< request.getRoles().forEach(role -> { userPatch.getRoles().add(new StringPatchItem.Builder().value(role).build()); ======= swuser.getRoles().forEach(role -> { role.getAuthorities().forEach(auth -> { user.getPrivileges().add(auth.getAuthority()); }); >>>>>>> request.getRoles().forEach(role -> { userPatch.getRoles().add(new StringPatchItem.Builder().value(role).build()); <<<<<<< IUser user = getUserByUsername(username); List<String> userAuths = new ArrayList(); for(IRole role: user.getRoles()) { List<String> authorities = role.getAuthorities().stream().map(auth -> auth.getAuthority()) .collect(Collectors.toList()); userAuths = authorities; } ======= // IUser user = getUserByUsername(username); // List<String> userAuths = user.getAuthorities(); List<String> userAuths = Collections.emptyList(); >>>>>>> IUser user = getUserByUsername(username); List<String> userAuths = new ArrayList(); for(IRole role: user.getRoles()) { List<String> authorities = role.getAuthorities().stream().map(auth -> auth.getAuthority()) .collect(Collectors.toList()); userAuths = authorities; }
<<<<<<< private int serializeNumber = 0;// default serialization is hession2 ======= private TraceableContext traceableContext = new TraceableContext(); >>>>>>> private int serializeNumber = 0;// default serialization is hession2 private TraceableContext traceableContext = new TraceableContext(); <<<<<<< @Override public void setSerializeNumber(int number) { this.serializeNumber = number; } @Override public int getSerializeNumber() { return serializeNumber; } ======= @Override public TraceableContext getTraceableContext() { return traceableContext; } >>>>>>> @Override public void setSerializeNumber(int number) { this.serializeNumber = number; } @Override public int getSerializeNumber() { return serializeNumber; } public TraceableContext getTraceableContext() { return traceableContext; }
<<<<<<< final boolean configured = chooser.scanHadoopConfigFiles(serverInformationCatalog, selectedServer); if (!configured) { ======= final boolean configured = chooser.scanHadoopConfigFiles(serverInformationCatalog); if (configured) { chooser.updateDirectories(); } else { >>>>>>> final boolean configured = chooser.scanHadoopConfigFiles(serverInformationCatalog, selectedServer); if (configured) { chooser.updateDirectories(); } else { <<<<<<< ======= private void updateDirectories() { _directoryComboBoxModel.updateDirectories(); } >>>>>>> private void updateDirectories() { _directoryComboBoxModel.updateDirectories(); }