conflict_resolution
stringlengths
27
16k
<<<<<<< ======= import org.rhq.core.domain.plugin.Plugin; import org.rhq.core.domain.plugin.PluginKey; >>>>>>> import org.rhq.core.domain.plugin.PluginKey; <<<<<<< ServerPlugin getServerPlugin(String name); ======= Plugin getServerPlugin(PluginKey key); >>>>>>> ServerPlugin getServerPlugin(PluginKey key);
<<<<<<< if (request.getCriteria().getValues().get("explicitResourceId") != null) { criteria.addFilterExplicitResourceIds(Integer.parseInt((String) request.getCriteria().getValues().get( "explicitResourceId"))); } ======= if (request.getCriteria().getValues().get("groupDefinitionId") != null) { criteria.addFilterGroupDefinitionId(Integer.parseInt((String) request.getCriteria().getValues().get( "groupDefinitionId"))); } >>>>>>> if (request.getCriteria().getValues().get("explicitResourceId") != null) { criteria.addFilterExplicitResourceIds(Integer.parseInt((String) request.getCriteria().getValues().get( "explicitResourceId"))); } if (request.getCriteria().getValues().get("groupDefinitionId") != null) { criteria.addFilterGroupDefinitionId(Integer.parseInt((String) request.getCriteria().getValues().get( "groupDefinitionId"))); }
<<<<<<< PageList<BundleDeployDefinition> findBundleDeployDefinitionsByCriteria(BundleDeployDefinitionCriteria criteria); PageList<BundleDeployment> findBundleDeploymentsByCriteria(BundleDeploymentCriteria criteria); List<BundleType> getAllBundleTypes(); ======= // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // // The following are shared with the Remote Interface // // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! >>>>>>> PageList<BundleDeployDefinition> findBundleDeployDefinitionsByCriteria(BundleDeployDefinitionCriteria criteria); PageList<BundleDeployment> findBundleDeploymentsByCriteria(BundleDeploymentCriteria criteria); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // // The following are shared with the Remote Interface // // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<<<<<<< ======= if (sr.evaluatedScript.isSuccess()) { /* // TODO: removed for current release if (sr.evaluatedScript.isSuccess()) { Object material = params.get("material"); if (material == null) { material = sr.eval.getParameter("material"); } if (material != null) { Parameter mat = (Parameter) material; String matSt = (String) mat.getValue(); EvaluatedScript result = sr.evaluatedScript; if (result != null && result.getScene() != null) { Scene scene = result.getScene(); if (scene.getLightingRig() == Scene.LightingRig.AUTO) { if(DEBUG)printf("In AUTO, material is: %s\n", matSt); } // automagically decide if (matSt.equals("None")) { scene.setLightingRig(Scene.LightingRig.THREE_POINT_COLORED); } else { scene.setLightingRig(Scene.LightingRig.THREE_POINT); } if(scene.getShapes().size() == 0){ // empty scene add invisible shape scene.addShape(new Shape(new Sphere(1.e-10),DefaultMaterial.getInstance())); } // TODO: We only want this code in for one release? Shape shape = scene.getShapes().get(0); if(DEBUG)printf("Got shape mat: %s\n",shape.getMaterial()); if (shape.getMaterial().equals(DefaultMaterial.getInstance())) { // using default material so for this release map selected for the script scene.setMaterial(0,PrintableMaterials.get(matSt)); } } } */ } // TODO: We might need this logic to retain backward compatible for rmr /* if (sr.result.isSuccess()) { Object material = params.get("material"); if (material == null) { material = sr.eval.getParameter("material"); } if (material != null) { Parameter mat = (Parameter) material; String matSt = (String) mat.getValue(); EvaluatedScript result = sr.result; if (result != null && result.getScene() != null) { if (matSt.equals("None")) { result.getScene().setMaterial(0,DefaultMaterial.getInstance()); // comment out on next release result.getScene().setLightingRig(Scene.LightingRig.THREE_POINT_COLORED); } else if (matMapper != null) { Material rm = matMapper.getImplementation(matSt); if (rm == null) rm = sr.eval.getImplementation(matSt); if (rm != null) { result.getScene().setMaterial(0,rm); // comment out on next release result.getScene().setLightingRig(Scene.LightingRig.THREE_POINT); } } } } } */ if (sr.evaluatedScript.isSuccess()) { >>>>>>> if (sr.evaluatedScript.isSuccess()) {
<<<<<<< List<Resource> entries = children.get(rsc); for (Resource res : entries) { ResourceTreeNode node = new ResourceTreeNode(res, parentNode); ======= List<ResourceFlyweight> entries = children.get(rsc); for (ResourceFlyweight res : entries) { ResourceTreeNode node = new ResourceTreeNode(res); >>>>>>> List<ResourceFlyweight> entries = children.get(rsc); for (ResourceFlyweight res : entries) { ResourceTreeNode node = new ResourceTreeNode(res, parentNode); <<<<<<< List<Resource> entries = children.get(rsc); for (Resource res : entries) { ResourceTreeNode node = new ResourceTreeNode(res, parentNode); ======= List<ResourceFlyweight> entries = children.get(rsc); for (ResourceFlyweight res : entries) { ResourceTreeNode node = new ResourceTreeNode(res); >>>>>>> List<ResourceFlyweight> entries = children.get(rsc); for (ResourceFlyweight res : entries) { ResourceTreeNode node = new ResourceTreeNode(res, parentNode);
<<<<<<< public class Resource implements Comparable<Resource>, Serializable { ======= public class Resource implements Comparable<Resource>, Externalizable { public static final String TABLE_NAME = "RHQ_RESOURCE"; >>>>>>> public class Resource implements Comparable<Resource>, Serializable { public static final String TABLE_NAME = "RHQ_RESOURCE";
<<<<<<< String tmpDirPath = System.getProperty("java.io.tmpdir"); File tmpDir = new File(tmpDirPath); File augeasRootPath = new File(tmpDir, "rhq-itest-augeas-root-path"); ======= inventoryManager.updatePluginConfiguration(resource.getId(), pluginConfig); } catch (Exception e) { fail("Failed to update Augeas root in plugin configuration.", e); } } public void resetAugeasConfigs() throws IOException { String tmpDirPath = System.getProperty("java.io.tmpdir"); File tmpDir = new File(tmpDirPath); File augeasRootPath = new File(tmpDir, "rhq-itest-augeas-root-path"); if (!augeasRootPath.exists()) { >>>>>>> inventoryManager.updatePluginConfiguration(resource.getId(), pluginConfig); } catch (Exception e) { fail("Failed to update Augeas root in plugin configuration.", e); } } public void resetAugeasConfigs() throws IOException { String tmpDirPath = System.getProperty("java.io.tmpdir"); File tmpDir = new File(tmpDirPath); File augeasRootPath = new File(tmpDir, "rhq-itest-augeas-root-path"); if (!augeasRootPath.exists()) { <<<<<<< ======= @Test(groups = TEST_GROUP) public void testResourceConfigUpdate() throws Exception { if (getResourceType().getResourceConfigurationDefinition() != null) { try { ConfigurationManager configurationManager = PluginContainer.getInstance().getConfigurationManager(); Resource resource = getResource(); Configuration updatedResourceConfig = getChangedResourceConfig(); configurationManager.updateResourceConfiguration(new ConfigurationUpdateRequest(0, updatedResourceConfig, resource.getId())); //give the component and the managed resource some time to properly persist the update Thread.sleep(500); Configuration resourceConfig = configurationManager.loadResourceConfiguration(resource.getId()); assert resourceConfig.equals(updatedResourceConfig) : "Unexpected Resource configuration - \nExpected:\n\t" + updatedResourceConfig.toString(true) + "\nActual:\n\t" + resourceConfig.toString(true); } finally { resetAugeasConfigs(); } } } >>>>>>> @Test(groups = TEST_GROUP) public void testResourceConfigUpdate() throws Exception { if (getResourceType().getResourceConfigurationDefinition() != null) { try { ConfigurationManager configurationManager = PluginContainer.getInstance().getConfigurationManager(); Resource resource = getResource(); Configuration updatedResourceConfig = getChangedResourceConfig(); configurationManager.updateResourceConfiguration(new ConfigurationUpdateRequest(0, updatedResourceConfig, resource.getId())); //give the component and the managed resource some time to properly persist the update Thread.sleep(500); Configuration resourceConfig = configurationManager.loadResourceConfiguration(resource.getId()); assert resourceConfig.equals(updatedResourceConfig) : "Unexpected Resource configuration - \nExpected:\n\t" + updatedResourceConfig.toString(true) + "\nActual:\n\t" + resourceConfig.toString(true); } finally { resetAugeasConfigs(); } } }
<<<<<<< ======= import com.datorama.timbermill.unit.Event; import com.datorama.timbermill.unit.EventsWrapper; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import org.apache.http.HttpHost; import org.slf4j.Logger; import org.slf4j.LoggerFactory; >>>>>>> import com.datorama.timbermill.unit.Event; import com.datorama.timbermill.unit.EventsWrapper; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import org.apache.http.HttpHost; import org.slf4j.Logger; import org.slf4j.LoggerFactory; <<<<<<< private static final int TWO_MB = 2097152; private static final int HTTP_TIMEOUT = 2000; private static final int MAX_RETRY = 3; ======= >>>>>>> private static final int TWO_MB = 2097152; private static final int HTTP_TIMEOUT = 2000; private static final int MAX_RETRY = 3;
<<<<<<< private static final String WAIT_FOR_COMPLETION = "wait_for_completion"; private boolean withPersistence; ======= >>>>>>> private boolean withPersistence;
<<<<<<< DiskHandler diskHandler = null; boolean withPersistence = builder.withPersistence; if (withPersistence) { diskHandler = ElasticsearchUtil.getDiskHandler(builder.diskHandlerStrategy,builder.buildDiskHandlerParams()); if (!diskHandler.isCreatedSuccefully()) { withPersistence = false; } } ======= >>>>>>> <<<<<<< private int maxFetchedBulksInOneTime = 100; ======= private int maxFetchedBulksInOneTime = 10; >>>>>>> private int maxFetchedBulksInOneTime = 100; <<<<<<< public Builder withPersistence(boolean withPersistence) { this.withPersistence = withPersistence; return this; } ======= >>>>>>>
<<<<<<< import java.time.ZonedDateTime; ======= import java.time.LocalTime; >>>>>>> import java.time.ZonedDateTime; import java.time.LocalTime; <<<<<<< LOG.info("Persistence Status: {} persisted to disk, {} re-processed successfully, {} failed after max retries from db, {} couldn't be inserted to db", numOfBulksPersistedToDisk, numOfSuccessfulBulksFromDisk, numOfFetchedMaxTimes, numOfCouldNotBeInserted); ======= LOG.info("Persistence Status: {} persisted to disk, {} re-processed successfully, {} failed after max retries from db since 00:00, {} couldn't be inserted to db since 00:00", numOfBulksPersistedToDisk, numOfSuccessfullBulksFromDisk, numOfFetchedMaxTimes, numOfCouldntBeInserted); >>>>>>> LOG.info("Persistence Status: {} persisted to disk, {} re-processed successfully, {} failed after max retries from db since 00:00, {} couldn't be inserted to db since 00:00", numOfBulksPersistedToDisk, numOfSuccessfulBulksFromDisk, numOfFetchedMaxTimes, numOfCouldNotBeInserted);
<<<<<<< nonPartialOrphansQuery.filter(partialOrphansRangeQuery); ======= >>>>>>>
<<<<<<< import org.apache.commons.lang3.StringUtils; import org.simpleframework.xml.Element; import org.simpleframework.xml.convert.Convert; ======= >>>>>>> import org.apache.commons.lang3.StringUtils; import org.simpleframework.xml.Element; import org.simpleframework.xml.convert.Convert;
<<<<<<< double mix = ((dist-m_minValue) - m_attribMixThreshold)*m_attribMixFactor; mix = m_attribMixAmount*clamp(mix,0.,1.); lerp(data.v,embData.v, mix, data.v, 1,m_baseChannelsCount-1); return RESULT_OK; ======= double attribMix = ((dist-m_minValue) - m_attribMixThreshold)*m_attribMixFactor; attribMix = clamp(attribMix,0.,1.); lerp(data.v,embData.v, attribMix, data.v, 1,m_baseChannelsCount-1); return ResultCodes.RESULT_OK; >>>>>>> double mix = ((dist-m_minValue) - m_attribMixThreshold)*m_attribMixFactor; mix = m_attribMixAmount*clamp(mix,0.,1.); lerp(data.v,embData.v, mix, data.v, 1,m_baseChannelsCount-1); return ResultCodes.RESULT_OK;
<<<<<<< import com.github.rustdt.ide.ui.RustImages; import com.github.rustdt.ide.ui.editor.RustFmtEditorOperation; import com.github.rustdt.ide.ui.text.RustAutoEditStrategy; import LANG_PROJECT_ID.ide.core_text.LangDocumentPartitionerSetup; import LANG_PROJECT_ID.ide.core_text.RustDocumentSetupParticipant; ======= import LANG_PROJECT_ID.ide.core.text.LANGUAGE_AutoEditStrategy; import LANG_PROJECT_ID.ide.core_text.LANGUAGE_DocumentSetupParticipant; import LANG_PROJECT_ID.ide.ui.LANGUAGE_Images; import LANG_PROJECT_ID.ide.ui.editor.LANGUAGE_FormatEditorOperation; >>>>>>> import com.github.rustdt.ide.core_text.RustDocumentSetupParticipant; import com.github.rustdt.ide.ui.RustImages; import com.github.rustdt.ide.ui.editor.RustFmtEditorOperation; import com.github.rustdt.ide.ui.text.RustAutoEditStrategy; <<<<<<< ======= import melnorme.lang.ide.core_text.LangDocumentPartitionerSetup; import melnorme.lang.ide.ui.editor.actions.AbstractEditorToolOperation; >>>>>>> import melnorme.lang.ide.core_text.LangDocumentPartitionerSetup;
<<<<<<< public class SoundManager extends Thread implements SoundPool.OnLoadCompleteListener, OnPreparedListener { ======= public class SoundManager implements SoundPool.OnLoadCompleteListener, OnPreparedListener, OnErrorListener { >>>>>>> public class SoundManager extends Thread implements SoundPool.OnLoadCompleteListener, OnPreparedListener, OnErrorListener {
<<<<<<< if (!player.isCreative()) { dish.setServes(dish.getServes() - 1); } worldIn.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_PLAYER_BURP, SoundCategory.PLAYERS, 0.5F, worldIn.rand.nextFloat() * 0.1F + 0.9F); dish.onEaten(stack, worldIn, player); player.addStat(StatList.getObjectUseStats(this)); ======= ConsumeCompositeFoodEvent.Post post = new ConsumeCompositeFoodEvent.Post(dish, player, null); MinecraftForge.EVENT_BUS.post(post); >>>>>>> if (!player.isCreative()) { dish.setServes(dish.getServes() - 1); } worldIn.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_PLAYER_BURP, SoundCategory.PLAYERS, 0.5F, worldIn.rand.nextFloat() * 0.1F + 0.9F); dish.onEaten(stack, worldIn, player); player.addStat(StatList.getObjectUseStats(this)); ConsumeCompositeFoodEvent.Post post = new ConsumeCompositeFoodEvent.Post(dish, player, null); MinecraftForge.EVENT_BUS.post(post);
<<<<<<< import net.minecraftforge.fml.common.Loader; import scala.util.Random; ======= >>>>>>> import net.minecraftforge.fml.common.Loader;
<<<<<<< @Override public void setValue(Object val) { if(val instanceof Integer) val = new Double(((Integer)val).intValue()); validate(val); this.value = val; } ======= public double getStep() { return step; } public void setStep(double step) { this.step = step; } >>>>>>> public double getStep() { return step; } public void setStep(double step) { this.step = step; } @Override public void setValue(Object val) { if(val instanceof Integer) val = new Double(((Integer)val).intValue()); validate(val); this.value = val; } <<<<<<< ======= if (val == null) return; >>>>>>>
<<<<<<< import java.util.List; ======= import java.util.*; >>>>>>> import java.util.List; <<<<<<< import javax.faces.component.*; import javax.faces.component.html.HtmlInputText; ======= import javax.faces.component.FacesComponent; import javax.faces.component.html.HtmlInputText; >>>>>>> import javax.faces.component.*; import javax.faces.component.html.HtmlInputText; <<<<<<< public void decode(FacesContext context) { // Map<String, String> params = // context.getExternalContext().getRequestParameterMap(); // List<String> everyProperty = // ELTools.getEveryProperty(ELTools.getCoreValueExpression(this), false); // for (String property : everyProperty) { // // String id = (getClientId() + property).replace(".", "").replace(":", // ""); // String value = params.get(id); // setSubmittedValue(value); // } } @Override public void encodeBegin(FacesContext context) throws IOException { encodeChildren(context); ======= public void encodeBegin(FacesContext context) throws IOException { Application app = FacesContext.getCurrentInstance().getApplication(); String rootProperty = ELTools.getCoreValueExpression(this); int beanNameIndex = rootProperty.lastIndexOf('.'); List<String> everyProperty = ELTools.getEveryProperty(rootProperty, false); for (String property : everyProperty) { HtmlInputText sychronizingHiddenInput = (HtmlInputText) app.createComponent("javax.faces.HtmlInputText"); ValueExpression valueExpression = ELTools.createValueExpression("#{" + property + "}"); sychronizingHiddenInput.setValueExpression("value", valueExpression); sychronizingHiddenInput.setId((getClientId() + property).replace(".", "").replace(":", "")); sychronizingHiddenInput.getPassThroughAttributes(true).put("ng-model", property.substring(beanNameIndex + 1)); sychronizingHiddenInput.getAttributes().put("name", property); sychronizingHiddenInput.encodeAll(context); } } private String getAttributeName() { String attributeName = ELTools.getCoreValueExpression(this); if (attributeName.contains(".")) { int pos = attributeName.lastIndexOf('.'); attributeName = attributeName.substring(pos + 1); } return attributeName; >>>>>>> public void decode(FacesContext context) { } @Override public void encodeBegin(FacesContext context) throws IOException { encodeChildren(context); <<<<<<< @Override public boolean isListenerForSource(Object source) { return (source instanceof UIViewRoot); } /** * Catching the PreRenderViewEvent allows AngularFaces to modify the JSF tree * by adding a label and a message. */ @Override public void processEvent(SystemEvent event) throws AbortProcessingException { FacesContext context = FacesContext.getCurrentInstance(); if (!context.isPostback()) { Application app = context.getApplication(); String rootProperty = ELTools.getCoreValueExpression(this); int beanNameIndex = rootProperty.lastIndexOf('.'); List<String> everyProperty = ELTools.getEveryProperty(rootProperty, false); for (String property : everyProperty) { HtmlInputText sychronizingHiddenInput = (HtmlInputText) app.createComponent("javax.faces.HtmlInputText"); ValueExpression valueExpression = ELTools.createValueExpression("#{" + property + "}"); sychronizingHiddenInput.setValueExpression("value", valueExpression); sychronizingHiddenInput.setId((getClientId() + property).replace(".", "").replace(":", "")); sychronizingHiddenInput.getPassThroughAttributes(true).put("ng-model", property.substring(beanNameIndex + 1)); sychronizingHiddenInput.getAttributes().put("name", property); getChildren().add(sychronizingHiddenInput); } } } ======= >>>>>>> @Override public boolean isListenerForSource(Object source) { return (source instanceof UIViewRoot); } /** * Catching the PreRenderViewEvent allows AngularFaces to modify the JSF tree * by adding a label and a message. */ @Override public void processEvent(SystemEvent event) throws AbortProcessingException { FacesContext context = FacesContext.getCurrentInstance(); if (!context.isPostback()) { Application app = context.getApplication(); String rootProperty = ELTools.getCoreValueExpression(this); int beanNameIndex = rootProperty.lastIndexOf('.'); List<String> everyProperty = ELTools.getEveryProperty(rootProperty, false); for (String property : everyProperty) { HtmlInputText sychronizingHiddenInput = (HtmlInputText) app.createComponent("javax.faces.HtmlInputText"); ValueExpression valueExpression = ELTools.createValueExpression("#{" + property + "}"); sychronizingHiddenInput.setValueExpression("value", valueExpression); sychronizingHiddenInput.setId((getClientId() + property).replace(".", "").replace(":", "")); sychronizingHiddenInput.getPassThroughAttributes(true).put("ng-model", property.substring(beanNameIndex + 1)); sychronizingHiddenInput.getAttributes().put("name", property); getChildren().add(sychronizingHiddenInput); } } }
<<<<<<< slideTransitionCheckBox.setSelected(props.getUseSlideTransition()); ======= if (props.getShowDBSongPreview()) { databasePreviewCombo.getSelectionModel().select(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.databasepreview")); } else if (props.getImmediateSongDBPreview()) { databasePreviewCombo.getSelectionModel().select(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.previewpane")); } else { databasePreviewCombo.getSelectionModel().select(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.control")); } >>>>>>> if (props.getShowDBSongPreview()) { databasePreviewCombo.getSelectionModel().select(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.databasepreview")); } else if (props.getImmediateSongDBPreview()) { databasePreviewCombo.getSelectionModel().select(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.previewpane")); } else { databasePreviewCombo.getSelectionModel().select(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.control")); } slideTransitionCheckBox.setSelected(props.getUseSlideTransition()); <<<<<<< boolean useSlideTransition = slideTransitionCheckBox.isSelected(); props.setUseSlideTransition(useSlideTransition); ======= if (databasePreviewCombo.getSelectionModel().getSelectedItem().equals(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.databasepreview"))) { props.setShowDBSongPreview(true); props.setImmediateSongDBPreview(false); } else if (databasePreviewCombo.getSelectionModel().getSelectedItem().equals(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.previewpane"))) { props.setShowDBSongPreview(false); props.setImmediateSongDBPreview(true); } else { props.setShowDBSongPreview(false); props.setImmediateSongDBPreview(false); } >>>>>>> boolean useSlideTransition = slideTransitionCheckBox.isSelected(); props.setUseSlideTransition(useSlideTransition); if (databasePreviewCombo.getSelectionModel().getSelectedItem().equals(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.databasepreview"))) { props.setShowDBSongPreview(true); props.setImmediateSongDBPreview(false); } else if (databasePreviewCombo.getSelectionModel().getSelectedItem().equals(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.previewpane"))) { props.setShowDBSongPreview(false); props.setImmediateSongDBPreview(true); } else { props.setShowDBSongPreview(false); props.setImmediateSongDBPreview(false); }
<<<<<<< mainPane.getChildren().add(loadingText); Scene scene = new Scene(mainPane); if (QueleaProperties.get().getUseDarkTheme()) { scene.getStylesheets().add("org/modena_dark.css"); } setScene(scene); ======= setScene(new Scene(mainPane)); >>>>>>> Scene scene = new Scene(mainPane); if (QueleaProperties.get().getUseDarkTheme()) { scene.getStylesheets().add("org/modena_dark.css"); } setScene(scene);
<<<<<<< ======= >>>>>>> <<<<<<< /** * Determine if the user has changed the interface theme since the last * call of resetLanguageChanged(). */ public boolean hasThemeChanged() { return !interfaceThemeComboBox.getValue().equals(currentTHeme); } ======= >>>>>>> /** * Determine if the user has changed the interface theme since the last * call of resetLanguageChanged(). */ public boolean hasThemeChanged() { return !interfaceThemeComboBox.getValue().equals(currentTHeme); } <<<<<<< ======= if (databasePreviewCombo.getSelectionModel().getSelectedItem().equals(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.databasepreview"))) { props.setShowDBSongPreview(true); props.setImmediateSongDBPreview(false); } else if (databasePreviewCombo.getSelectionModel().getSelectedItem().equals(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.previewpane"))) { props.setShowDBSongPreview(false); props.setImmediateSongDBPreview(true); } else { props.setShowDBSongPreview(false); props.setImmediateSongDBPreview(false); } >>>>>>> if (databasePreviewCombo.getSelectionModel().getSelectedItem().equals(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.databasepreview"))) { props.setShowDBSongPreview(true); props.setImmediateSongDBPreview(false); } else if (databasePreviewCombo.getSelectionModel().getSelectedItem().equals(LabelGrabber.INSTANCE.getLabel("db.song.preview.label.previewpane"))) { props.setShowDBSongPreview(false); props.setImmediateSongDBPreview(true); } else { props.setShowDBSongPreview(false); props.setImmediateSongDBPreview(false); }
<<<<<<< nozzleTipsPanel = new NozzleTipsPanel(this, configuration); machineSetupPanel = new MachineSetupPanel(); ======= nozzleTipsPanel = new NozzleTipsPanel(); >>>>>>> machineSetupPanel = new MachineSetupPanel(); nozzleTipsPanel = new NozzleTipsPanel();
<<<<<<< import org.openpnp.vision.pipeline.ui.PipelinePropertySheetTable; ======= import org.openpnp.vision.FluentCv; import org.openpnp.vision.FluentCv.ColorSpace; >>>>>>> import org.openpnp.vision.pipeline.ui.PipelinePropertySheetTable; import org.openpnp.vision.FluentCv; import org.openpnp.vision.FluentCv.ColorSpace; <<<<<<< public Result(Mat image, Object model, long processingTimeNs, CvStage stage) { ======= public Result(Mat image, ColorSpace colorSpace, Object model, long processingTimeNs) { >>>>>>> public Result(Mat image, ColorSpace colorSpace, Object model, long processingTimeNs, CvStage stage) { <<<<<<< this.stage = stage; ======= this.colorSpace = colorSpace; } public Result(Mat image, Object model, long processingTimeNs) { this(image, null, model, processingTimeNs); } public Result(Mat image, ColorSpace colorSpace, Object model) { this(image, colorSpace, model, 0); >>>>>>> this.stage = stage; this.colorSpace = colorSpace; <<<<<<< public CvStage getStage() { return stage; } public String getName() { if (stage != null) { return stage.getName(); } return ""; } @SuppressWarnings("unchecked") public <T> T getExpectedModel(Class<T> expectedModelClass) throws Exception { // Due to type erasure we need to pass the class as well. T typedModel = null; if (model == null) { throw new Exception("Pipeline stage \""+getName()+"\" returned no "+expectedModelClass.getSimpleName()+"."); } if (expectedModelClass.isInstance(model)) { typedModel = (T)model; } if (typedModel == null) { throw new Exception("Pipeline stage \""+getName()+"\" returned a "+model.getClass().getSimpleName()+" but expected a "+expectedModelClass.getSimpleName()+"."); } return typedModel; } @SuppressWarnings("unchecked") public <T> List<T> getExpectedListModel(Class<T> expectedElementClass, Exception emptyException) throws Exception { @SuppressWarnings("rawtypes") List list = getExpectedModel(List.class); if (list.size() == 0) { if (emptyException != null) { throw emptyException; } return (List<T>)list; } if (!expectedElementClass.isInstance(list.get(0))) { throw new Exception("Pipeline stage \""+getName()+"\" returned a "+list.get(0).getClass().getSimpleName()+" list but expected a "+expectedElementClass.getSimpleName()+" list."); } return (List<T>)list; } ======= public ColorSpace getColorSpace() { return colorSpace; } >>>>>>> public ColorSpace getColorSpace() { return colorSpace; } public CvStage getStage() { return stage; } public String getName() { if (stage != null) { return stage.getName(); } return ""; } @SuppressWarnings("unchecked") public <T> T getExpectedModel(Class<T> expectedModelClass) throws Exception { // Due to type erasure we need to pass the class as well. T typedModel = null; if (model == null) { throw new Exception("Pipeline stage \""+getName()+"\" returned no "+expectedModelClass.getSimpleName()+"."); } if (expectedModelClass.isInstance(model)) { typedModel = (T)model; } if (typedModel == null) { throw new Exception("Pipeline stage \""+getName()+"\" returned a "+model.getClass().getSimpleName()+" but expected a "+expectedModelClass.getSimpleName()+"."); } return typedModel; } @SuppressWarnings("unchecked") public <T> List<T> getExpectedListModel(Class<T> expectedElementClass, Exception emptyException) throws Exception { @SuppressWarnings("rawtypes") List list = getExpectedModel(List.class); if (list.size() == 0) { if (emptyException != null) { throw emptyException; } return (List<T>)list; } if (!expectedElementClass.isInstance(list.get(0))) { throw new Exception("Pipeline stage \""+getName()+"\" returned a "+list.get(0).getClass().getSimpleName()+" list but expected a "+expectedElementClass.getSimpleName()+" list."); } return (List<T>)list; }
<<<<<<< private Class[] columnTypes = new Class[] {PartCellValue.class, Part.class, Side.class, LengthCellValue.class, LengthCellValue.class, RotationCellValue.class, Type.class, Status.class, String.class}; ======= private Class[] columnTypes = new Class[] {String.class, Part.class, Side.class, LengthCellValue.class, LengthCellValue.class, String.class, Type.class, Status.class, Boolean.class}; >>>>>>> private Class[] columnTypes = new Class[] {PartCellValue.class, Part.class, Side.class, LengthCellValue.class, LengthCellValue.class, RotationCellValue.class, Type.class, Status.class, Boolean.class}; <<<<<<< if (aValue.toString().compareTo("Yes") == 0) { placement.setGlue(true); } else { placement.setGlue(false); } ======= placement.setGlue((Boolean) aValue); >>>>>>> placement.setGlue((Boolean) aValue); <<<<<<< if (placement.getGlue()) { return "Yes"; } else { return "No"; } ======= return placement.getGlue(); >>>>>>> return placement.getGlue();
<<<<<<< @Override public Actuator getLightActuator() { return null; } @Override public void ensureCameraVisible() { } @Override public boolean hasNewFrame() { return true; } ======= public Location getUnitsPerPixel(Length z) { return new Location(LengthUnit.Millimeters, 1, 1, 0, 0).derive(null, null, z.getValue(), null); } @Override public Location getUnitsPerPixel(Location location) { return new Location(LengthUnit.Millimeters, 1, 1, 0, 0); } @Override public Length getDefaultZ() { return new Length(0.0, LengthUnit.Millimeters); } @Override public void setDefaultZ(Length defaultZ) { } >>>>>>> @Override public Actuator getLightActuator() { return null; } @Override public void ensureCameraVisible() { } @Override public boolean hasNewFrame() { return true; } public Location getUnitsPerPixel(Length z) { return new Location(LengthUnit.Millimeters, 1, 1, 0, 0).derive(null, null, z.getValue(), null); } @Override public Location getUnitsPerPixel(Location location) { return new Location(LengthUnit.Millimeters, 1, 1, 0, 0); } @Override public Length getDefaultZ() { return new Length(0.0, LengthUnit.Millimeters); }
<<<<<<< results.put(stage, new Result(image, model, processingTimeNs, stage)); ======= // If the result colorSpace is null and there is a working colorSpace, // replace the result colorSpace with the working colorSpace. if (colorSpace == null) { if (workingColorSpace != null) { colorSpace = workingColorSpace; } } results.put(stage, new Result(image, colorSpace, model, processingTimeNs)); >>>>>>> // If the result colorSpace is null and there is a working colorSpace, // replace the result colorSpace with the working colorSpace. if (colorSpace == null) { if (workingColorSpace != null) { colorSpace = workingColorSpace; } } results.put(stage, new Result(image, colorSpace, model, processingTimeNs, stage));
<<<<<<< ======= // move to the discard location try { Map<String, Object> globals = new HashMap<>(); globals.put("nozzle", nozzle); Configuration.get().getScripting().on("Job.BeforeDiscard", globals); } catch (Exception e) { Logger.warn(e); } MovableUtils.moveToLocationAtSafeZ(nozzle, Configuration.get() .getMachine() .getDiscardLocation()); >>>>>>> try { Map<String, Object> globals = new HashMap<>(); globals.put("nozzle", nozzle); Configuration.get().getScripting().on("Job.BeforeDiscard", globals); } catch (Exception e) { Logger.warn(e); } <<<<<<< nozzle.place(Configuration.get().getMachine().getDiscardLocation()); ======= nozzle.place(); nozzle.moveToSafeZ(); try { Map<String, Object> globals = new HashMap<>(); globals.put("nozzle", nozzle); Configuration.get().getScripting().on("Job.AfterDiscard", globals); } catch (Exception e) { Logger.warn(e); } >>>>>>> nozzle.place(Configuration.get().getMachine().getDiscardLocation()); try { Map<String, Object> globals = new HashMap<>(); globals.put("nozzle", nozzle); Configuration.get().getScripting().on("Job.AfterDiscard", globals); } catch (Exception e) { Logger.warn(e); }
<<<<<<< private JCheckBox chckbxUseAffineTransfor; ======= JCheckBox enabledAveragingCheckbox; JTextField textFieldRepeatFiducialRecognition; >>>>>>> JCheckBox enabledAveragingCheckbox; JTextField textFieldRepeatFiducialRecognition; <<<<<<< FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, ======= FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, >>>>>>> FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, <<<<<<< chckbxUseAffineTransfor = new JCheckBox("Use Affine Transform"); panel.add(chckbxUseAffineTransfor, "2, 4, 5, 1"); ======= JLabel lblRepeatFiducialRecognition = new JLabel("Repeat Recognition"); panel.add(lblRepeatFiducialRecognition, "2, 4"); textFieldRepeatFiducialRecognition = new JTextField(); textFieldRepeatFiducialRecognition.setToolTipText("To dial-in on fiducials the recognition is repeated several times, but at least 3 times. (default: 3)"); panel.add(textFieldRepeatFiducialRecognition, "4, 4"); textFieldRepeatFiducialRecognition.setColumns(2); JLabel lblEnabledAveraging = new JLabel("Average Matches?"); lblEnabledAveraging.setToolTipText("Finally calculates the arithmetic average over all matches (except the first). Needs 3 or more repeated recognitions to work."); panel.add(lblEnabledAveraging, "2, 6"); enabledAveragingCheckbox = new JCheckBox(""); panel.add(enabledAveragingCheckbox, "4, 6"); >>>>>>> JLabel lblRepeatFiducialRecognition = new JLabel("Repeat Recognition"); panel.add(lblRepeatFiducialRecognition, "2, 4"); textFieldRepeatFiducialRecognition = new JTextField(); textFieldRepeatFiducialRecognition.setToolTipText("To dial-in on fiducials the recognition is repeated several times, but at least 3 times. (default: 3)"); panel.add(textFieldRepeatFiducialRecognition, "4, 4"); textFieldRepeatFiducialRecognition.setColumns(2); JLabel lblEnabledAveraging = new JLabel("Average Matches?"); lblEnabledAveraging.setToolTipText("Finally calculates the arithmetic average over all matches (except the first). Needs 3 or more repeated recognitions to work."); panel.add(lblEnabledAveraging, "2, 6"); enabledAveragingCheckbox = new JCheckBox(""); panel.add(enabledAveragingCheckbox, "4, 6"); <<<<<<< addWrappedBinding(fiducialLocator, "useAffineTransform", chckbxUseAffineTransfor, "selected"); ======= IntegerConverter intConverter = new IntegerConverter(); addWrappedBinding(fiducialLocator, "enabledAveraging", enabledAveragingCheckbox, "selected"); addWrappedBinding(fiducialLocator, "repeatFiducialRecognition", textFieldRepeatFiducialRecognition, "text", intConverter); ComponentDecorators.decorateWithAutoSelect(textFieldRepeatFiducialRecognition); >>>>>>> IntegerConverter intConverter = new IntegerConverter(); addWrappedBinding(fiducialLocator, "enabledAveraging", enabledAveragingCheckbox, "selected"); addWrappedBinding(fiducialLocator, "repeatFiducialRecognition", textFieldRepeatFiducialRecognition, "text", intConverter); ComponentDecorators.decorateWithAutoSelect(textFieldRepeatFiducialRecognition);
<<<<<<< public CvPipelineEditorDialog(Frame owner, String title, CvPipelineEditor editor) { super(owner, title); getContentPane().setLayout(new BorderLayout()); getContentPane().add(editor); Rectangle rect = owner.getBounds(); int wmargin = rect.width/20; int hmargin = rect.height/20; setBounds(new Rectangle( rect.x+wmargin, rect.y+hmargin, rect.width-2*wmargin, rect.height-2*hmargin)); this.editor = editor; } ======= public CvPipelineEditorDialog(Frame owner, String title, CvPipelineEditor editor) { super(owner, title); setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { if (editor.isDirty()) { int selection = JOptionPane.showConfirmDialog(owner, "Save pipeline changes?", "Closing Pipeline Editor!", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null ); switch (selection) { case JOptionPane.YES_OPTION: super.windowClosing(e); CvPipelineEditorDialog.this.dispose(); return; case JOptionPane.NO_OPTION: editor.undoEdits(); super.windowClosing(e); CvPipelineEditorDialog.this.dispose(); return; case JOptionPane.CANCEL_OPTION: return; } } else { super.windowClosing(e); CvPipelineEditorDialog.this.dispose(); } } }); getContentPane().setLayout(new BorderLayout()); getContentPane().add(editor); setSize(1024, 768); this.editor = editor; } >>>>>>> public CvPipelineEditorDialog(Frame owner, String title, CvPipelineEditor editor) { super(owner, title); setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { if (editor.isDirty()) { int selection = JOptionPane.showConfirmDialog(owner, "Save pipeline changes?", "Closing Pipeline Editor!", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null ); switch (selection) { case JOptionPane.YES_OPTION: super.windowClosing(e); CvPipelineEditorDialog.this.dispose(); return; case JOptionPane.NO_OPTION: editor.undoEdits(); super.windowClosing(e); CvPipelineEditorDialog.this.dispose(); return; case JOptionPane.CANCEL_OPTION: return; } } else { super.windowClosing(e); CvPipelineEditorDialog.this.dispose(); } } }); getContentPane().setLayout(new BorderLayout()); getContentPane().add(editor); Rectangle rect = owner.getBounds(); int wmargin = rect.width/20; int hmargin = rect.height/20; setBounds(new Rectangle( rect.x+wmargin, rect.y+hmargin, rect.width-2*wmargin, rect.height-2*hmargin)); this.editor = editor; }
<<<<<<< import java.util.ArrayList; import java.util.List; ======= >>>>>>> import java.util.ArrayList; import java.util.List; <<<<<<< for (OpenCvCapturePropertyValue pv : properties) { if (pv.setBeforeOpen) { Logger.debug("Setting property {} on camera {} to {}", pv.property.toString(), this,pv.value); fg.set(pv.property.getPropertyId(), pv.value); } } ======= /** * Based on comments in https://github.com/openpnp/openpnp/issues/395 some cameras * may only handle resolution changes before opening while others handle it after * so we do both to try to cover both cases. */ if (preferredWidth != 0) { Logger.debug("Setting camera {} width to {}", this, preferredWidth); fg.set(Highgui.CV_CAP_PROP_FRAME_WIDTH, preferredWidth); Logger.debug("Camera {} reports width {}", this, fg.get(Highgui.CV_CAP_PROP_FRAME_WIDTH)); } if (preferredHeight != 0) { Logger.debug("Setting camera {} height to {}", this, preferredHeight); fg.set(Highgui.CV_CAP_PROP_FRAME_HEIGHT, preferredHeight); Logger.debug("Camera {} reports height {}", this, fg.get(Highgui.CV_CAP_PROP_FRAME_HEIGHT)); } >>>>>>> for (OpenCvCapturePropertyValue pv : properties) { if (pv.setBeforeOpen) { Logger.debug("Setting property {} on camera {} to {}", pv.property.toString(), this,pv.value); fg.set(pv.property.getPropertyId(), pv.value); } } /** * Based on comments in https://github.com/openpnp/openpnp/issues/395 some cameras * may only handle resolution changes before opening while others handle it after * so we do both to try to cover both cases. */ if (preferredWidth != 0) { Logger.debug("Setting camera {} width to {}", this, preferredWidth); fg.set(Highgui.CV_CAP_PROP_FRAME_WIDTH, preferredWidth); Logger.debug("Camera {} reports width {}", this, fg.get(Highgui.CV_CAP_PROP_FRAME_WIDTH)); } if (preferredHeight != 0) { Logger.debug("Setting camera {} height to {}", this, preferredHeight); fg.set(Highgui.CV_CAP_PROP_FRAME_HEIGHT, preferredHeight); Logger.debug("Camera {} reports height {}", this, fg.get(Highgui.CV_CAP_PROP_FRAME_HEIGHT)); } <<<<<<< for (OpenCvCapturePropertyValue pv : properties) { if (pv.setAfterOpen) { Logger.debug("Setting property {} on camera {} to {}", pv.property.toString(), this, pv.value); fg.set(pv.property.getPropertyId(), pv.value); } } ======= >>>>>>> for (OpenCvCapturePropertyValue pv : properties) { if (pv.setAfterOpen) { Logger.debug("Setting property {} on camera {} to {}", pv.property.toString(), this, pv.value); fg.set(pv.property.getPropertyId(), pv.value); } } /** * Based on comments in https://github.com/openpnp/openpnp/issues/395 some cameras * may only handle resolution changes before opening while others handle it after * so we do both to try to cover both cases. */
<<<<<<< ======= @Attribute(required = false) private RecalibrationTrigger recalibrationTrigger = RecalibrationTrigger.NozzleTipChangeInJob; /** * TODO Left for backward compatibility. Unused. Can be removed after Feb 7, 2020. */ @Deprecated @Attribute(required=false) private Double angleIncrement = null; @Commit public void commit() { angleIncrement = null; } >>>>>>> @Attribute(required = false) private RecalibrationTrigger recalibrationTrigger = RecalibrationTrigger.NozzleTipChangeInJob; /** * TODO Left for backward compatibility. Unused. Can be removed after Feb 7, 2020. */ @Deprecated @Attribute(required=false) private Double angleIncrement = null; @Commit public void commit() { angleIncrement = null; } <<<<<<< // TODO STOPSHIP refactor calibration to nozzle, instead of nozzletip if (true) { throw new Exception("Calibration is broken in this version. Please downgrade if you require calibration."); } // Nozzle nozzle = nozzleTip.getParentNozzle(); Nozzle nozzle = null; ======= >>>>>>>
<<<<<<< @Test public void testJoinOnMap() { Entity from = from(Entity.class); SubEntity innerJoin = innerJoin(from.getSubEntityMap()); String query = select(innerJoin).getQuery(); assertEquals("select subEntity_1 from Entity entity_0 inner join entity_0.subEntityMap subEntity_1", query); } ======= @Test public void testSelectWithChainedMethodCall() { Entity from = from(Entity.class); com.netappsid.jpaquery.Query<String> select = select(from.getSubEntity().getCode()); assertEquals("select entity_0.subEntity.code from Entity entity_0", select.getQuery()); } @Test public void testWhereWithChainedMethodCall() { Entity from = from(Entity.class); where(from.getSubEntity().getCode()).eq("test"); com.netappsid.jpaquery.Query<Entity> select = select(from); assertEquals("select entity_0 from Entity entity_0 where entity_0.subEntity.code = :code_1", select.getQuery()); assertEquals("test", select.getParameters().get("code_1")); } >>>>>>> @Test public void testSelectWithChainedMethodCall() { Entity from = from(Entity.class); com.netappsid.jpaquery.Query<String> select = select(from.getSubEntity().getCode()); assertEquals("select entity_0.subEntity.code from Entity entity_0", select.getQuery()); } @Test public void testWhereWithChainedMethodCall() { Entity from = from(Entity.class); where(from.getSubEntity().getCode()).eq("test"); com.netappsid.jpaquery.Query<Entity> select = select(from); assertEquals("select entity_0 from Entity entity_0 where entity_0.subEntity.code = :code_1", select.getQuery()); assertEquals("test", select.getParameters().get("code_1")); } @Test public void testJoinOnMap() { Entity from = from(Entity.class); SubEntity innerJoin = innerJoin(from.getSubEntityMap()); String query = select(innerJoin).getQuery(); assertEquals("select subEntity_1 from Entity entity_0 inner join entity_0.subEntityMap subEntity_1", query); }
<<<<<<< /** * This is the entry point for clients of the Service Locator. To access the Service Locator * clients have to first {@link #connect() connect} to the Service Locator to get a session * assigned. Once the connection is * established the client will periodically send heart beats to the server to keep the session * alive. * <p> * The Service Locator provides the following operations. * <ul> * <li>An endpoint for a specific service can be registered. If the client is destroyed, * disconnect, or fails to successfully send the heartbeat for a period of timed defined by the * {@link #setSessionTimeout(int) session timeout parameter} the endpoint is removed from the * Service Locator. * <li>All endpoints for a specific service that were registered before by other clients can be * looked up. * </ul> * * */ ======= /** * This is the entry point for clients of the Service Locator. To access the Service Locator * clients have to first {@link #connect() connect} to the Service Locator. * */ >>>>>>> /** * This is the entry point for clients of the Service Locator. To access the Service Locator * clients have to first {@link #connect() connect} to the Service Locator to get a session * assigned. Once the connection is * established the client will periodically send heart beats to the server to keep the session * alive. * <p> * The Service Locator provides the following operations. * <ul> * <li>An endpoint for a specific service can be registered. If the client is destroyed, * disconnect, or fails to successfully send the heartbeat for a period of timed defined by the * {@link #setSessionTimeout(int) session timeout parameter} the endpoint is removed from the * Service Locator. * <li>All endpoints for a specific service that were registered before by other clients can be * looked up. * </ul> * */ <<<<<<< private boolean nodeExists(NodePath path) throws KeeperException, InterruptedException { return zk.exists(path.toString(), false) != null; } private void createNode(NodePath path, CreateMode mode) throws KeeperException, InterruptedException { zk.create(path.toString(), EMPTY_CONTENT, Ids.OPEN_ACL_UNSAFE, mode); } private List<String> getChildren(NodePath path) throws KeeperException, InterruptedException { return zk.getChildren(path.toString(), false); ======= private boolean nodeExists(NodePath path) throws KeeperException, InterruptedException { return zk.exists(path.toString(), false) != null; } private void createNode(NodePath path, CreateMode mode) throws KeeperException, InterruptedException { zk.create(path.toString(), EMPTY_CONTENT, Ids.OPEN_ACL_UNSAFE, mode); >>>>>>> private boolean nodeExists(NodePath path) throws KeeperException, InterruptedException { return zk.exists(path.toString(), false) != null; } private void createNode(NodePath path, CreateMode mode) throws KeeperException, InterruptedException { zk.create(path.toString(), EMPTY_CONTENT, Ids.OPEN_ACL_UNSAFE, mode); } private List<String> getChildren(NodePath path) throws KeeperException, InterruptedException { return zk.getChildren(path.toString(), false);
<<<<<<< private static WSDLServiceFactory createServiceFactory(URL wsdlLocation) { final Bus b = CXFBusFactory.getThreadDefaultBus(); return new WSDLServiceFactory(b, wsdlLocation.toExternalForm()); } ======= >>>>>>>
<<<<<<< import itdelatrisu.opsu.downloads.servers.OsuMirrorServer; import itdelatrisu.opsu.ui.KinecticScrolling; ======= import itdelatrisu.opsu.downloads.servers.MengSkyServer; import itdelatrisu.opsu.downloads.servers.MnetworkServer; import itdelatrisu.opsu.downloads.servers.YaSOnlineServer; import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.DropdownMenu; import itdelatrisu.opsu.ui.Fonts; >>>>>>> import itdelatrisu.opsu.downloads.servers.MengSkyServer; import itdelatrisu.opsu.downloads.servers.MnetworkServer; import itdelatrisu.opsu.downloads.servers.YaSOnlineServer; import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.DropdownMenu; import itdelatrisu.opsu.ui.Fonts; import itdelatrisu.opsu.ui.KinecticScrolling; <<<<<<< nodes[index].drawResult(g, offset + i * DownloadNode.getButtonOffset(), DownloadNode.resultContains(mouseX, mouseY - offset, i), ======= nodes[index].drawResult(g, i, DownloadNode.resultContains(mouseX, mouseY, i) && !inDropdownMenu, >>>>>>> nodes[index].drawResult(g, offset + i * DownloadNode.getButtonOffset(), DownloadNode.resultContains(mouseX, mouseY - offset, i) && !inDropdownMenu, <<<<<<< queryThread = new Thread() { @Override public void run() { activeRequests++; // check page direction Page lastPageDir = pageDir; pageDir = Page.RESET; int lastPageSize = (resultList != null) ? resultList.length : 0; int newPage = page; if (lastPageDir == Page.RESET) newPage = 1; else if (lastPageDir == Page.NEXT) newPage++; else if (lastPageDir == Page.PREVIOUS) newPage--; try { DownloadNode[] nodes = server.resultList(query, newPage, rankedOnly); if (activeRequests - 1 == 0) { // update page total page = newPage; if (nodes != null) { if (lastPageDir == Page.NEXT) pageResultTotal += nodes.length; else if (lastPageDir == Page.PREVIOUS) pageResultTotal -= lastPageSize; else if (lastPageDir == Page.RESET) pageResultTotal = nodes.length; } else pageResultTotal = 0; resultList = nodes; totalResults = server.totalResults(); focusResult = -1; startResultPos.setPosition(0); if (nodes == null) searchResultString = "An error has occurred."; else { if (query.isEmpty()) searchResultString = "Type to search!"; else if (totalResults == 0 || resultList.length == 0) searchResultString = "No results found."; else searchResultString = String.format("%d result%s found!", totalResults, (totalResults == 1) ? "" : "s"); } } } catch (IOException e) { searchResultString = "Could not establish connection to server."; } finally { activeRequests--; queryThread = null; } } }; ======= searchQuery = new SearchQuery(query, server); queryThread = new Thread(searchQuery); >>>>>>> searchQuery = new SearchQuery(query, server); queryThread = new Thread(searchQuery); <<<<<<< resetSearchTimer(); return; } if (serverButton.contains(x, y)) { SoundController.playSound(SoundEffect.MENUCLICK); resultList = null; startResultPos.setPosition(0); focusResult = -1; totalResults = 0; page = 0; pageResultTotal = 1; pageDir = Page.RESET; searchResultString = "Loading data from server..."; serverIndex = (serverIndex + 1) % SERVERS.length; lastQuery = null; pageDir = Page.RESET; ======= if (searchQuery != null) searchQuery.interrupt(); >>>>>>> if (searchQuery != null) searchQuery.interrupt();
<<<<<<< import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; ======= import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.session.SessionAutoConfiguration; >>>>>>> import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.session.SessionAutoConfiguration; import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; <<<<<<< @SpringBootApplication public class GenieWeb extends WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter { ======= @SpringBootApplication(exclude = {SessionAutoConfiguration.class, RedisAutoConfiguration.class}) public class GenieWeb { >>>>>>> @SpringBootApplication(exclude = {SessionAutoConfiguration.class, RedisAutoConfiguration.class}) public class GenieWeb extends WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter {
<<<<<<< import java.util.HashSet; ======= import java.util.List; >>>>>>> import java.util.ArrayList; import java.util.HashSet; import java.util.List; <<<<<<< public void setApplications(final Set<Application> applications) { //Clear references to this command in existing applications if (this.applications != null) { for (final Application app : this.applications) { if (app.getCommands() != null) { app.getCommands().remove(this); } } } //set the applications for this command ======= public void setApplications(final List<Application> applications) { >>>>>>> public void setApplications(final List<Application> applications) { //Clear references to this command in existing applications if (this.applications != null) { for (final Application app : this.applications) { if (app.getCommands() != null) { app.getCommands().remove(this); } } } //set the applications for this command
<<<<<<< if (isLeadIn()) { // stop updating during song lead-in leadInTime -= delta; if (!isLeadIn()) MusicController.resume(); return; } int trackPosition = MusicController.getPosition(); if (!isReplay) { ======= if (GameMod.AUTO.isActive() || GameMod.AUTOPILOT.isActive()) { mouseX = autoMouseX; mouseY = autoMouseY; } else if (!isReplay) { >>>>>>> if (isLeadIn()) { // stop updating during song lead-in leadInTime -= delta; if (!isLeadIn()) MusicController.resume(); return; } int trackPosition = MusicController.getPosition(); if (GameMod.AUTO.isActive() || GameMod.AUTOPILOT.isActive()) { mouseX = autoMouseX; mouseY = autoMouseY; frameAndRun(mouseX, mouseY, lastKeysPressed, trackPosition); } else if (!isReplay) { <<<<<<< Replay r = data.getReplay(replayFrames.toArray(new ReplayFrame[replayFrames.size()]), osu); if (r != null) ======= Replay r = data.getReplay(replayFrames.toArray(new ReplayFrame[replayFrames.size()])); if (r != null && !unranked) >>>>>>> Replay r = data.getReplay(replayFrames.toArray(new ReplayFrame[replayFrames.size()]), osu); if (r != null && !unranked) <<<<<<< ======= // "autopilot" mod: ignore actual cursor coordinates int cx, cy; if (GameMod.AUTOPILOT.isActive()) { cx = autoMouseX; cy = autoMouseY; } else { cx = x; cy = y; } if (!isReplay) addReplayFrame(cx, cy, lastKeysPressed | keys); >>>>>>> // "autopilot" mod: ignore actual cursor coordinates int cx, cy; if (GameMod.AUTOPILOT.isActive()) { cx = autoMouseX; cy = autoMouseY; } else { cx = x; cy = y; } <<<<<<< if (hitObject.isCircle() && hitObjects[objectIndex].mousePressed(x, y, trackPosition)) ======= if (hitObject.isCircle() && hitObjects[objectIndex].mousePressed(cx, cy)) >>>>>>> if (hitObject.isCircle() && hitObjects[objectIndex].mousePressed(cx, cy, trackPosition)) <<<<<<< hitObjects[objectIndex].mousePressed(x, y, trackPosition); ======= hitObjects[objectIndex].mousePressed(cx, cy); >>>>>>> hitObjects[objectIndex].mousePressed(cx, cy, trackPosition); <<<<<<< ======= // run frame updates in another thread killReplayThread(); replayThread = new Thread() { @Override public void run() { while (replayThreadRunning) { // update frames int trackPosition = MusicController.getPosition(); while (replayIndex < replay.frames.length && trackPosition >= replay.frames[replayIndex].getTime()) { ReplayFrame frame = replay.frames[replayIndex]; replayX = frame.getScaledX(); replayY = frame.getScaledY(); replayKeyPressed = frame.isKeyPressed(); int keys = frame.getKeys(); if (replayKeyPressed && keys != replayKeys) // send a key press gameKeyPressed(frame.getKeys(), replayX, replayY); replayKeys = keys; replayIndex++; } // out of frames if (replayIndex >= replay.frames.length) break; // sleep execution try { int diff = replay.frames[replayIndex].getTime() - trackPosition - 1; if (diff < 1) Thread.sleep(0, 256000); else Thread.sleep(diff); } catch (InterruptedException e) {} } } }; if (!GameMod.AUTO.isActive()) { // "auto" mod: ignore replay frames replayThreadRunning = true; replayThread.start(); } >>>>>>> <<<<<<< UI.hideCursor(); ======= killReplayThread(); >>>>>>>
<<<<<<< final String executable) throws CloudServiceException { super(name, user); ======= final String executable) { super(); this.name = name; this.user = user; >>>>>>> final String executable, final String version) throws GenieException { super(name, user, version); <<<<<<< public void validate() throws CloudServiceException { this.validate( this.getName(), this.getUser(), this.getStatus(), this.getExecutable()); ======= public static void validate(final Command command) throws GenieException { if (command == null) { throw new GenieException( HttpURLConnection.HTTP_BAD_REQUEST, "No command entered to validate"); } validate( command.getName(), command.getUser(), command.getStatus(), command.getExecutable()); >>>>>>> public void validate() throws GenieException { this.validate( this.getName(), this.getUser(), this.getStatus(), this.getExecutable());
<<<<<<< import org.apache.commons.lang3.StringUtils; ======= import lombok.extern.slf4j.Slf4j; >>>>>>> import org.apache.commons.lang3.StringUtils; import lombok.extern.slf4j.Slf4j;
<<<<<<< * @param jobCoordinatorService The job search service to use. * @param attachmentService The attachment service to use to save attachments. * @param jobResourceAssembler Assemble job resources out of jobs * @param hostname The hostname this Genie instance is running on * @param httpClient The http client to use for forwarding requests * @param resourceHttpRequestHandler The handler to return requests for static resources on the Genie File System. * @param directoryForwardingEnabled Whether job directory forwarding is enabled or not ======= * @param jobService The job search service to use. * @param attachmentService The attachment service to use to save attachments. * @param jobResourceAssembler Assemble job resources out of jobs * @param jobSearchResultResourceAssembler Assemble job search resources out of jobs * @param hostname The hostname this Genie instance is running on * @param httpClient The http client to use for forwarding requests * @param resourceHttpRequestHandler The handler to return requests for static resources on the * Genie File System. * @param directoryForwardingEnabled Whether job directory forwarding is enabled or not >>>>>>> * @param jobCoordinatorService The job search service to use. * @param attachmentService The attachment service to use to save attachments. * @param jobResourceAssembler Assemble job resources out of jobs * @param jobSearchResultResourceAssembler Assemble job search resources out of jobs * @param hostname The hostname this Genie instance is running on * @param httpClient The http client to use for forwarding requests * @param resourceHttpRequestHandler The handler to return requests for static resources on the * Genie File System. * @param directoryForwardingEnabled Whether job directory forwarding is enabled or not <<<<<<< this.jobCoordinatorService.getJobs( ======= this.jobService.findJobs( >>>>>>> this.jobCoordinatorService.findJobs(
<<<<<<< final Set<String> commandCriteria, final List<ClusterCriteria> clusterCriteria) throws CloudServiceException { super(name, user); ======= final List<ClusterCriteria> clusterCriteria) throws GenieException { this.user = user; this.commandId = commandId; this.commandName = commandName; >>>>>>> final Set<String> commandCriteria, final List<ClusterCriteria> clusterCriteria, final String version) throws GenieException { super(name, user, version); <<<<<<< protected void onCreateJob() throws CloudServiceException { validate(this.getUser(), this.commandCriteria, this.commandArgs, this.clusterCriteria, this.getName()); this.clusterCriteriaString = clusterCriteriaToString(this.clusterCriteria); this.commandCriteriaString = commandCriteriaToString(this.commandCriteria); // Add the id to the tags if (this.tags == null) { this.tags = new HashSet<String>(); this.tags.add(this.getId()); } // Set version to -1 if not specified if (StringUtils.isBlank(this.getVersion())) { this.setVersion(DEFAULT_VERSION); } ======= protected void onCreateJob() throws GenieException { validate(this.user, this.commandId, this.commandName, this.commandArgs, this.clusterCriteria); this.clusterCriteriaString = criteriaToString(this.clusterCriteria); } /** * Gets the name for this job. * * @return name */ public String getName() { return this.name; >>>>>>> protected void onCreateJob() throws GenieException { validate(this.getUser(), this.commandCriteria, this.commandArgs, this.clusterCriteria, this.getName()); this.clusterCriteriaString = clusterCriteriaToString(this.clusterCriteria); this.commandCriteriaString = commandCriteriaToString(this.commandCriteria); // Add the id to the tags if (this.tags == null) { this.tags = new HashSet<String>(); this.tags.add(this.getId()); } // Set version to -1 if not specified if (StringUtils.isBlank(this.getVersion())) { this.setVersion(DEFAULT_VERSION); } <<<<<<< ======= * Gets the user who submit the job. * * @return the user */ public String getUser() { return this.user; } /** * Sets the user who submits the job. * * @param user user submitting the job * @throws com.netflix.genie.common.exceptions.GenieException */ public void setUser(final String user) throws GenieException { if (StringUtils.isBlank(user)) { throw new GenieException( HttpURLConnection.HTTP_BAD_REQUEST, "No user entered."); } this.user = user; } /** >>>>>>> <<<<<<< public void validate() throws CloudServiceException { this.validate( this.getUser(), this.getCommandCriteria(), this.getCommandArgs(), this.getClusterCriteria(), this.getName()); ======= public static void validate(final Job job) throws GenieException { if (job == null) { final String msg = "Required parameter job can't be NULL"; LOG.error(msg); throw new GenieException(HttpURLConnection.HTTP_BAD_REQUEST, msg); } validate( job.getUser(), job.getCommandId(), job.getCommandName(), job.getCommandArgs(), job.getClusterCriteria()); >>>>>>> public void validate() throws GenieException { this.validate( this.getUser(), this.getCommandCriteria(), this.getCommandArgs(), this.getClusterCriteria(), this.getName()); <<<<<<< final List<ClusterCriteria> criteria, final String name) throws CloudServiceException { ======= final List<ClusterCriteria> criteria) throws GenieException { >>>>>>> final List<ClusterCriteria> criteria, final String name) throws GenieException { <<<<<<< private String clusterCriteriaToString(final List<ClusterCriteria> clusterCriteria2) throws CloudServiceException { ======= private String criteriaToString(final List<ClusterCriteria> clusterCriteria2) throws GenieException { >>>>>>> private String clusterCriteriaToString(final List<ClusterCriteria> clusterCriteria2) throws GenieException { <<<<<<< private List<ClusterCriteria> stringToClusterCriteria(final String criteriaString) throws CloudServiceException { ======= private List<ClusterCriteria> stringToCriteria(final String criteriaString) throws GenieException { >>>>>>> private List<ClusterCriteria> stringToClusterCriteria(final String criteriaString) throws GenieException {
<<<<<<< boolean overlap = (objectIndex + 1 < hitObjects.length && trackPosition > osu.objects[objectIndex + 1].getTime() - hitResultOffset[GameData.HIT_50]); ======= boolean overlap = (objectIndex + 1 < gameObjects.length && trackPosition > beatmap.objects[objectIndex + 1].getTime() - hitResultOffset[GameData.HIT_300]); >>>>>>> boolean overlap = (objectIndex + 1 < hitObjects.length && trackPosition > osu.objects[objectIndex + 1].getTime() - hitResultOffset[GameData.HIT_50]); <<<<<<< if(y < 50){ float pos = (float)x / width * osu.endTime; System.out.println("Seek to"+pos); MusicController.setPosition((int)pos); } ======= // playback speed button else if (playbackSpeed.getButton().contains(x, y)) { playbackSpeed = playbackSpeed.next(); MusicController.setPitch(GameMod.getSpeedMultiplier() * playbackSpeed.getModifier()); } >>>>>>> if(y < 50){ float pos = (float)x / width * osu.endTime; System.out.println("Seek to"+pos); MusicController.setPosition((int)pos); } <<<<<<< if (i + 1 >= osu.objects.length || osu.objects[i + 1].isNewCombo()) ======= if (i + 1 < beatmap.objects.length && beatmap.objects[i + 1].isNewCombo()) >>>>>>> if (i + 1 >= osu.objects.length || osu.objects[i + 1].isNewCombo()) <<<<<<< ======= gameObjects = new GameObject[beatmap.objects.length]; >>>>>>> //conflict gameObjects = new GameObject[beatmap.objects.length]; // <<<<<<< System.out.println("Game Key Pressed"+keys+" "+x+" "+y+" "+objectIndex); if (objectIndex >= hitObjects.length) // nothing to do here ======= if (objectIndex >= gameObjects.length) // nothing to do here >>>>>>> System.out.println("Game Key Pressed"+keys+" "+x+" "+y+" "+objectIndex); if (objectIndex >= gameObjects.length) // nothing to do here
<<<<<<< if (StringUtils.isEmpty(command.getId())) { command.setId(UUID.randomUUID().toString()); } if (this.commandRepo.exists(command.getId())) { throw new CloudServiceException( HttpURLConnection.HTTP_BAD_REQUEST, "A command with id " + command.getId() + " already exists"); } final Set<Application> detachedApps = new HashSet<Application>(); if (command.getApplications() != null && !command.getApplications().isEmpty()) { detachedApps.addAll(command.getApplications()); command.getApplications().clear(); } final Command persistedCommand = this.commandRepo.save(command); if (!detachedApps.isEmpty()) { final Set<Application> attachedApps = new HashSet<Application>(); for (final Application detached : detachedApps) { final Application app = this.appRepo.findOne(detached.getId()); if (app != null) { attachedApps.add(app); } } //Handles both sides of relationship persistedCommand.setApplications(attachedApps); ======= final EntityManager em = this.pm.createEntityManager(); final EntityTransaction trans = em.getTransaction(); try { trans.begin(); if (StringUtils.isEmpty(command.getId())) { command.setId(UUID.randomUUID().toString()); } if (em.contains(command)) { throw new CloudServiceException( HttpURLConnection.HTTP_BAD_REQUEST, "A command with id " + command.getId() + " already exists"); } em.persist(command); trans.commit(); return command; } finally { if (trans.isActive()) { trans.rollback(); } em.close(); >>>>>>> if (StringUtils.isEmpty(command.getId())) { command.setId(UUID.randomUUID().toString()); } if (this.commandRepo.exists(command.getId())) { throw new CloudServiceException( HttpURLConnection.HTTP_BAD_REQUEST, "A command with id " + command.getId() + " already exists"); } return this.commandRepo.save(command); } /** * {@inheritDoc} * * @throws CloudServiceException */ @Override @Transactional(readOnly = true) public Command getCommand(final String id) throws CloudServiceException { LOG.debug("called"); if (StringUtils.isEmpty(id)) { throw new CloudServiceException( HttpURLConnection.HTTP_BAD_REQUEST, "Id can't be null or empty."); } final Command command = this.commandRepo.findOne(id); if (command != null) { return command; } else { throw new CloudServiceException( HttpURLConnection.HTTP_NOT_FOUND, "No command with id " + id + " exists."); } } /** * {@inheritDoc} */ @Override @Transactional(readOnly = true) public List<Command> getCommands( final String name, final String userName, final int page, final int limit) { LOG.debug("Called"); //TODO: Switch to this in the CommandRepository final CriteriaBuilder cb = this.em.getCriteriaBuilder(); final CriteriaQuery<Command> cq = cb.createQuery(Command.class); final Root<Command> c = cq.from(Command.class); final List<Predicate> predicates = new ArrayList<Predicate>(); if (StringUtils.isNotEmpty(name)) { predicates.add(cb.equal(c.get(Command_.name), name)); } if (StringUtils.isNotEmpty(userName)) { predicates.add(cb.equal(c.get(Command_.user), userName)); } cq.where(cb.and(predicates.toArray(new Predicate[0]))); final TypedQuery<Command> query = this.em.createQuery(cq); final int finalPage = page < 0 ? 0 : page; final int finalLimit = limit < 0 ? 1024 : limit; query.setMaxResults(finalLimit); query.setFirstResult(finalLimit * finalPage); return query.getResultList(); } /** * {@inheritDoc} * * @throws CloudServiceException */ @Override public Command updateCommand( final String id, final Command updateCommand) throws CloudServiceException { if (StringUtils.isEmpty(id)) { throw new CloudServiceException( HttpURLConnection.HTTP_BAD_REQUEST, "No id entered. Unable to update."); } if (StringUtils.isBlank(updateCommand.getId()) || !id.equals(updateCommand.getId())) { throw new CloudServiceException( HttpURLConnection.HTTP_BAD_REQUEST, "Command id either not entered or inconsistent with id passed in."); } LOG.debug("Called to update command with id " + id + " " + updateCommand.toString()); final Command command = this.em.merge(updateCommand); Command.validate(command); return command; } /** * {@inheritDoc} * * @throws CloudServiceException */ @Override public List<Command> deleteAllCommands() throws CloudServiceException { LOG.debug("Called to delete all commands"); final Iterable<Command> commands = this.commandRepo.findAll(); final List<Command> returnCommands = new ArrayList<Command>(); for (final Command command : commands) { returnCommands.add(this.deleteCommand(command.getId())); <<<<<<< final Command command = this.commandRepo.findOne(id); if (command == null) { throw new CloudServiceException( HttpURLConnection.HTTP_NOT_FOUND, "No command with id " + id + " exists to delete."); } //Remove the command from the associated Application references final Set<Application> apps = command.getApplications(); if (apps != null) { for (final Application app : apps) { final Set<Command> commands = app.getCommands(); if (commands != null) { commands.remove(command); ======= final EntityManager em = this.pm.createEntityManager(); final EntityTransaction trans = em.getTransaction(); try { trans.begin(); final Command command = em.find(Command.class, id); if (command == null) { throw new CloudServiceException( HttpURLConnection.HTTP_NOT_FOUND, "No command with id " + id + " exists to delete."); } //Remove the command from the associated Application references final List<Application> apps = command.getApplications(); if (apps != null) { for (final Application app : apps) { final Set<Command> commands = app.getCommands(); if (commands != null) { commands.remove(command); } >>>>>>> final Command command = this.commandRepo.findOne(id); if (command == null) { throw new CloudServiceException( HttpURLConnection.HTTP_NOT_FOUND, "No command with id " + id + " exists to delete."); } //Remove the command from the associated Application references final List<Application> apps = command.getApplications(); if (apps != null) { for (final Application app : apps) { final Set<Command> commands = app.getCommands(); if (commands != null) { commands.remove(command); <<<<<<< final Command command = this.commandRepo.findOne(id); if (command != null) { for (final Application detached : applications) { final Application app = this.appRepo.findOne(detached.getId()); if (app != null) { command.addApplication(app); ======= final EntityManager em = this.pm.createEntityManager(); final EntityTransaction trans = em.getTransaction(); try { trans.begin(); final Command command = em.find(Command.class, id); if (command != null) { for (final Application detached : applications) { final Application app = em.find(Application.class, detached.getId()); if (app != null) { command.getApplications().add(app); app.getCommands().add(command); } else { throw new CloudServiceException( HttpURLConnection.HTTP_NOT_FOUND, "No application with id " + detached.getId() + " exists."); } >>>>>>> final Command command = this.commandRepo.findOne(id); if (command != null) { for (final Application detached : applications) { final Application app = this.appRepo.findOne(detached.getId()); if (app != null) { command.addApplication(app); } else { throw new CloudServiceException( HttpURLConnection.HTTP_NOT_FOUND, "No application with id " + detached.getId() + " exists."); <<<<<<< @Transactional(readOnly = true) public Set<Application> getApplicationsForCommand( ======= public List<Application> getApplicationsForCommand( >>>>>>> @Transactional(readOnly = true) public List<Application> getApplicationsForCommand( <<<<<<< final Command command = this.commandRepo.findOne(id); if (command != null) { final Set<Application> apps = new HashSet<Application>(); for (final Application detached : applications) { final Application app = this.appRepo.findOne(detached.getId()); if (app != null) { apps.add(app); ======= final EntityManager em = this.pm.createEntityManager(); final EntityTransaction trans = em.getTransaction(); try { trans.begin(); final Command command = em.find(Command.class, id); if (command != null) { final List<Application> apps = new ArrayList<Application>(); for (final Application detached : applications) { final Application app = em.find(Application.class, detached.getId()); if (app != null) { apps.add(app); app.getCommands().add(command); } else { throw new CloudServiceException( HttpURLConnection.HTTP_NOT_FOUND, "No application with id " + detached.getId() + " exists."); } >>>>>>> final Command command = this.commandRepo.findOne(id); if (command != null) { final List<Application> apps = new ArrayList<Application>(); for (final Application detached : applications) { final Application app = this.appRepo.findOne(detached.getId()); if (app != null) { apps.add(app);
<<<<<<< protected void addArgumentGen( JavaCommand cmd ) { if ( this.genParam ) { if ( !this.gen.exists() ) { this.gen.mkdirs(); } cmd.arg( "-gen", this.gen.getAbsolutePath() ); } } ======= protected void addPersistentUnitCache(JavaCommand cmd) { if ( persistentunitcache != null ) { cmd.systemProperty( "gwt.persistentunitcache", String.valueOf( persistentunitcache.booleanValue() ) ); } if ( persistentunitcachedir != null ) { cmd.systemProperty( "gwt.persistentunitcachedir", persistentunitcachedir.getAbsolutePath() ); } } >>>>>>> protected void addArgumentGen( JavaCommand cmd ) { if ( this.genParam ) { if ( !this.gen.exists() ) { this.gen.mkdirs(); } cmd.arg( "-gen", this.gen.getAbsolutePath() ); } } protected void addPersistentUnitCache(JavaCommand cmd) { if ( persistentunitcache != null ) { cmd.systemProperty( "gwt.persistentunitcache", String.valueOf( persistentunitcache.booleanValue() ) ); } if ( persistentunitcachedir != null ) { cmd.systemProperty( "gwt.persistentunitcachedir", persistentunitcachedir.getAbsolutePath() ); } }
<<<<<<< HitSound.setDefaultSampleSet(osu.sampleSet); ======= HitSound.setSampleSet(osu.sampleSet); MultiClip.destroyExtraClips(); >>>>>>> HitSound.setDefaultSampleSet(osu.sampleSet); MultiClip.destroyExtraClips();
<<<<<<< import org.nd4j.linalg.factory.Nd4j; ======= import org.nd4j.linalg.dataset.api.iterator.cache.DataSetCache; import org.nd4j.linalg.dataset.api.iterator.cache.InFileDataSetCache; import org.nd4j.linalg.dataset.api.iterator.cache.InMemoryDataSetCache; >>>>>>> import org.nd4j.linalg.factory.Nd4j; import org.nd4j.linalg.dataset.api.iterator.cache.DataSetCache; import org.nd4j.linalg.dataset.api.iterator.cache.InFileDataSetCache; import org.nd4j.linalg.dataset.api.iterator.cache.InMemoryDataSetCache; <<<<<<< import weka.core.BatchPredictor; import weka.core.Capabilities; import weka.core.CapabilitiesHandler; import weka.core.EmptyIteratorException; import weka.core.Instance; import weka.core.Instances; import weka.core.InvalidValidationPercentageException; import weka.core.MissingOutputLayerException; import weka.core.OptionMetadata; import weka.core.SelectedTag; import weka.core.Tag; import weka.core.UnsupportedAttributeTypeException; import weka.core.WekaException; import weka.core.WekaPackageManager; import weka.core.WrongIteratorException; ======= import weka.core.*; import weka.dl4j.CacheMode; >>>>>>> import weka.core.BatchPredictor; import weka.core.Capabilities; import weka.core.CapabilitiesHandler; import weka.core.EmptyIteratorException; import weka.core.Instance; import weka.core.Instances; import weka.core.InvalidValidationPercentageException; import weka.core.MissingOutputLayerException; import weka.core.OptionMetadata; import weka.core.SelectedTag; import weka.core.Tag; import weka.core.UnsupportedAttributeTypeException; import weka.core.WekaException; import weka.core.WekaPackageManager; import weka.core.WrongIteratorException; import weka.core.*; import weka.dl4j.CacheMode; <<<<<<< /** Default constructor fixing log file if WEKA_HOME variable is not set. */ public Dl4jMlpClassifier() { Nd4j.getMemoryManager().setAutoGcWindow(10000); if (System.getenv("WEKA_HOME") == null) { logFile = new File("network.log"); } } ======= >>>>>>> /** Default constructor fixing log file if WEKA_HOME variable is not set. */ public Dl4jMlpClassifier() { Nd4j.getMemoryManager().setAutoGcWindow(10000); }
<<<<<<< import org.nd4j.linalg.factory.Nd4j; ======= import org.nd4j.linalg.dataset.api.iterator.cache.DataSetCache; import org.nd4j.linalg.dataset.api.iterator.cache.InFileDataSetCache; import org.nd4j.linalg.dataset.api.iterator.cache.InMemoryDataSetCache; >>>>>>> import org.nd4j.linalg.factory.Nd4j; import org.nd4j.linalg.dataset.api.iterator.cache.DataSetCache; import org.nd4j.linalg.dataset.api.iterator.cache.InFileDataSetCache; import org.nd4j.linalg.dataset.api.iterator.cache.InMemoryDataSetCache; <<<<<<< import weka.core.BatchPredictor; import weka.core.Capabilities; import weka.core.CapabilitiesHandler; import weka.core.EmptyIteratorException; import weka.core.Instance; import weka.core.Instances; import weka.core.InvalidValidationPercentageException; import weka.core.MissingOutputLayerException; import weka.core.OptionMetadata; import weka.core.SelectedTag; import weka.core.Tag; import weka.core.UnsupportedAttributeTypeException; import weka.core.WekaException; import weka.core.WekaPackageManager; import weka.core.WrongIteratorException; ======= import weka.core.*; import weka.dl4j.CacheMode; >>>>>>> import weka.core.BatchPredictor; import weka.core.Capabilities; import weka.core.CapabilitiesHandler; import weka.core.EmptyIteratorException; import weka.core.Instance; import weka.core.Instances; import weka.core.InvalidValidationPercentageException; import weka.core.MissingOutputLayerException; import weka.core.OptionMetadata; import weka.core.SelectedTag; import weka.core.Tag; import weka.core.UnsupportedAttributeTypeException; import weka.core.WekaException; import weka.core.WekaPackageManager; import weka.core.WrongIteratorException; import weka.core.*; import weka.dl4j.CacheMode; <<<<<<< /** Default constructor fixing log file if WEKA_HOME variable is not set. */ public Dl4jMlpClassifier() { Nd4j.getMemoryManager().setAutoGcWindow(10000); if (System.getenv("WEKA_HOME") == null) { logFile = new File("network.log"); } } ======= >>>>>>> /** Default constructor fixing log file if WEKA_HOME variable is not set. */ public Dl4jMlpClassifier() { Nd4j.getMemoryManager().setAutoGcWindow(10000); }
<<<<<<< /** * allow unpackBinaryHeader to read str format family (default:true) */ public final boolean readStringAsBinary; /** * allow unpackRawStringHeader and unpackString to read bin format family (default: true) */ public final boolean readBinaryAsString; /** * Action when encountered a malformed input */ public final CodingErrorAction actionOnMalFormedInput; /** * Action when an unmappable character is found */ public final CodingErrorAction actionOnUnmappableCharacter; /** * unpackString size limit. (default: Integer.MAX_VALUE) */ public final int maxUnpackStringSize; public final int stringEncoderBufferSize; public final int stringDecoderBufferSize; public final int packerBufferSize; public final int packerRawDataCopyingThreshold; ======= private final boolean readStringAsBinary; private final boolean readBinaryAsString; private final CodingErrorAction onMalFormedInput; private final CodingErrorAction onUnmappableCharacter; private final int maxUnpackStringSize; private final int stringEncoderBufferSize; private final int stringDecoderBufferSize; private final int packerBufferSize; private final int packerSmallStringOptimizationThreshold; // This parameter is subject to change private final int packerRawDataCopyingThreshold; >>>>>>> /** * allow unpackBinaryHeader to read str format family (default:true) */ public final boolean readStringAsBinary; /** * allow unpackRawStringHeader and unpackString to read bin format family (default: true) */ public final boolean readBinaryAsString; /** * Action when encountered a malformed input */ public final CodingErrorAction actionOnMalFormedInput; /** * Action when an unmappable character is found */ public final CodingErrorAction actionOnUnmappableCharacter; /** * unpackString size limit. (default: Integer.MAX_VALUE) */ public final int maxUnpackStringSize; public final int stringEncoderBufferSize; public final int stringDecoderBufferSize; public final int packerBufferSize; public final int packerRawDataCopyingThreshold; /** * Use String.getBytes() for strings smaller than this threshold. * Note that this parameter is subject to change. */ public final int packerSmallStringOptimizationThreshold; <<<<<<< ======= /** * allow unpackBinaryHeader to read str format family (default:true) */ public boolean isReadStringAsBinary() { return readStringAsBinary; } /** * allow unpackRawStringHeader and unpackString to read bin format family (default: true) */ public boolean isReadBinaryAsString() { return readBinaryAsString; } /** * Action when encountered a malformed input */ public CodingErrorAction getActionOnMalFormedInput() { return onMalFormedInput; } /** * Action when an unmappable character is found */ public CodingErrorAction getActionOnUnmappableCharacter() { return onUnmappableCharacter; } /** * unpackString size limit. (default: Integer.MAX_VALUE) */ public int getMaxUnpackStringSize() { return maxUnpackStringSize; } public int getStringEncoderBufferSize() { return stringEncoderBufferSize; } public int getStringDecoderBufferSize() { return stringDecoderBufferSize; } public int getPackerBufferSize() { return packerBufferSize; } public int getPackerSmallStringOptimizationThreshold() { return packerSmallStringOptimizationThreshold; } public int getPackerRawDataCopyingThreshold() { return packerRawDataCopyingThreshold; } >>>>>>>
<<<<<<< private ListTemplate(Template<E> elementTemplate) { ======= public ListTemplate(Template elementTemplate) { >>>>>>> public ListTemplate(Template<E> elementTemplate) {
<<<<<<< public static Container latvianContainer() { return new Container(new LatvianValues()); } ======= public static Container brazilianPortugueseContainer() { BrazilianPortugueseValues values = new BrazilianPortugueseValues(); PortugueseThousandToWordsConverter portugueseThousandToWordsConverter = new PortugueseThousandToWordsConverter( values.baseNumbers(), values.exceptions()); IntegerToStringConverter converter = new PortugueseIntegerToWordsConverter( new PortugueseIntegerToWordsConverterAdapter(portugueseThousandToWordsConverter, values.pluralForms()), values.exceptions(), portugueseThousandToWordsConverter); BigDecimalToStringConverter bigDecimalBankingMoneyValueConverter = new BigDecimalToBankingMoneyConverter( converter, values.currency()); return new Container(converter, bigDecimalBankingMoneyValueConverter); } >>>>>>> public static Container latvianContainer() { return new Container(new LatvianValues()); } public static Container brazilianPortugueseContainer() { BrazilianPortugueseValues values = new BrazilianPortugueseValues(); PortugueseThousandToWordsConverter portugueseThousandToWordsConverter = new PortugueseThousandToWordsConverter( values.baseNumbers(), values.exceptions()); IntegerToStringConverter converter = new PortugueseIntegerToWordsConverter( new PortugueseIntegerToWordsConverterAdapter(portugueseThousandToWordsConverter, values.pluralForms()), values.exceptions(), portugueseThousandToWordsConverter); BigDecimalToStringConverter bigDecimalBankingMoneyValueConverter = new BigDecimalToBankingMoneyConverter( converter, values.currency()); return new Container(converter, bigDecimalBankingMoneyValueConverter); }
<<<<<<< import itdelatrisu.opsu.replay.ReplayImporter; ======= import itdelatrisu.opsu.beatmap.BeatmapSetList; import itdelatrisu.opsu.beatmap.BeatmapParser; import itdelatrisu.opsu.ui.UI; >>>>>>> import itdelatrisu.opsu.replay.ReplayImporter; //conflict import itdelatrisu.opsu.beatmap.BeatmapSetList; import itdelatrisu.opsu.beatmap.BeatmapParser; import itdelatrisu.opsu.ui.UI; <<<<<<< OsuParser.parseAllFiles(beatmapDir); // import replays ReplayImporter.importAllReplaysFromDir(Options.getReplayImportDir()); ======= BeatmapParser.parseAllFiles(beatmapDir); >>>>>>> BeatmapParser.parseAllFiles(beatmapDir); // import replays ReplayImporter.importAllReplaysFromDir(Options.getReplayImportDir());
<<<<<<< import static pl.allegro.finance.tradukisto.internal.Container.slovakContainer; import java.math.BigDecimal; import pl.allegro.finance.tradukisto.internal.BigDecimalToStringConverter; ======= import static pl.allegro.finance.tradukisto.internal.Container.latvianContainer; >>>>>>> import static pl.allegro.finance.tradukisto.internal.Container.slovakContainer; import static pl.allegro.finance.tradukisto.internal.Container.latvianContainer; import java.math.BigDecimal; import pl.allegro.finance.tradukisto.internal.BigDecimalToStringConverter; <<<<<<< ENGLISH_BANKING_MONEY_VALUE(englishContainer().getBankingMoneyConverter()), SLOVAK_BANKING_MONEY_VALUE(slovakContainer().getBankingMoneyConverter()); ======= ENGLISH_BANKING_MONEY_VALUE(englishContainer().getBankingMoneyConverter()), LATVIAN_BANKING_MONEY_VALUE(latvianContainer().getBankingMoneyConverter()); >>>>>>> ENGLISH_BANKING_MONEY_VALUE(englishContainer().getBankingMoneyConverter()), SLOVAK_BANKING_MONEY_VALUE(slovakContainer().getBankingMoneyConverter()); LATVIAN_BANKING_MONEY_VALUE(latvianContainer().getBankingMoneyConverter());
<<<<<<< import itdelatrisu.opsu.ui.KinecticScrolling; ======= import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.Fonts; >>>>>>> import itdelatrisu.opsu.ui.KinecticScrolling; import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.Fonts; <<<<<<< float offset = (node == hoverIndex) ? hoverOffset : 0f; float ypos = buttonY + (i*buttonOffset) ; float mid = height/2 - ypos - buttonOffset/2; final float circleRadi = 1000 * GameImage.getUIscale(); //finds points along a very large circle // x^2 = h^2 - y^2 float t = circleRadi*circleRadi - (mid*mid); float xpos = (float)(t>0?Math.sqrt(t):0) - circleRadi + 50 * GameImage.getUIscale(); ======= float offset = (i == hoverIndex) ? hoverOffset.getValue() : 0f; >>>>>>> float offset = (node == hoverIndex) ? hoverOffset.getValue() : 0f; float ypos = buttonY + (i*buttonOffset) ; float mid = height/2 - ypos - buttonOffset/2; final float circleRadi = 700 * GameImage.getUIscale(); //finds points along a very large circle (x^2 = h^2 - y^2) float t = circleRadi * circleRadi - (mid * mid); float xpos = (float)(t>0?Math.sqrt(t):0) - circleRadi + 50 * GameImage.getUIscale(); <<<<<<< ======= // score buttons if (focusScores != null) { int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); float timerScale = 1f - (1 / 3f) * ((MAX_SCORE_BUTTONS - scoreButtons) / (float) (MAX_SCORE_BUTTONS - 1)); int duration = (int) (songChangeTimer.getDuration() * timerScale); int segmentDuration = (int) ((2 / 3f) * songChangeTimer.getDuration()); int time = songChangeTimer.getTime(); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { long prevScore = (rank + 1 < focusScores.length) ? focusScores[rank + 1].score : -1; float t = Utils.clamp((time - (i * (duration - segmentDuration) / scoreButtons)) / (float) segmentDuration, 0f, 1f); boolean focus = (t >= 0.9999f && ScoreData.buttonContains(mouseX, mouseY, i)); focusScores[rank].draw(g, i, rank, prevScore, focus, t); } // scroll bar if (focusScores.length > MAX_SCORE_BUTTONS && ScoreData.areaContains(mouseX, mouseY)) ScoreData.drawScrollbar(g, startScore, focusScores.length); } >>>>>>> <<<<<<< ======= // scroll bar if (focusNode != null) { int focusNodes = focusNode.getBeatmapSet().size(); int totalNodes = BeatmapSetList.get().size() + focusNodes - 1; if (totalNodes > MAX_SONG_BUTTONS) { int startIndex = startNode.index; if (startNode.index > focusNode.index) startIndex += focusNodes; else if (startNode.index == focusNode.index) startIndex += startNode.beatmapIndex; UI.drawScrollbar(g, startIndex, totalNodes, MAX_SONG_BUTTONS, width, headerY + DIVIDER_LINE_WIDTH / 2, 0, buttonOffset - DIVIDER_LINE_WIDTH * 1.5f, buttonOffset, Colors.BLACK_ALPHA, Color.white, true); } } >>>>>>> <<<<<<< if (node == hoverIndex) { if (hoverOffset < MAX_HOVER_OFFSET) { hoverOffset += delta / 3f; if (hoverOffset > MAX_HOVER_OFFSET) hoverOffset = MAX_HOVER_OFFSET; } } else { hoverIndex = node ; hoverOffset = 0f; ======= if (i == hoverIndex) hoverOffset.update(delta); else { hoverIndex = i; hoverOffset.setTime(0); >>>>>>> if (node == hoverIndex) { hoverOffset.update(delta); } else { hoverIndex = node ; hoverOffset.setTime(0); <<<<<<< hoverOffset = 0f; hoverIndex = null; ======= hoverOffset.setTime(0); hoverIndex = -1; >>>>>>> hoverOffset.setTime(0); hoverIndex = null; <<<<<<< if (focusScores != null) { int startScore = (int) (startScorePos.getPosition() / ScoreData.getButtonOffset()); int offset = (int) (-startScorePos.getPosition() + startScore * ScoreData.getButtonOffset()); for (int i = 0; i < MAX_SCORE_BUTTONS; i++) { int rank = startScore + i; if (rank < 0) continue; if (rank >= focusScores.length) break; if (ScoreData.buttonContains(mouseX, mouseY - offset, i)) { ======= if (focusScores != null && ScoreData.areaContains(mouseX, mouseY)) { int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { if (ScoreData.buttonContains(mouseX, mouseY, i)) { >>>>>>> if (focusScores != null && ScoreData.areaContains(mouseX, mouseY)) { int startScore = (int) (startScorePos.getPosition() / ScoreData.getButtonOffset()); int offset = (int) (-startScorePos.getPosition() + startScore * ScoreData.getButtonOffset()); int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { if (rank < 0) continue; if (ScoreData.buttonContains(mouseX, mouseY - offset, i)) { <<<<<<< float oldHoverOffset = hoverOffset; BeatmapSetNode oldHoverIndex = hoverIndex; ======= int oldHoverOffsetTime = hoverOffset.getTime(); int oldHoverIndex = hoverIndex; >>>>>>> int oldHoverOffsetTime = hoverOffset.getTime(); BeatmapSetNode oldHoverIndex = hoverIndex; <<<<<<< for (int i = 0; i < MAX_SCORE_BUTTONS + 1; i++) { int startScore = (int) (startScorePos.getPosition() / ScoreData.getButtonOffset()); int offset = (int) (-startScorePos.getPosition() + startScore * ScoreData.getButtonOffset()); int rank = startScore + i; if (rank >= focusScores.length) break; if (ScoreData.buttonContains(x, y - offset, i)) { ======= int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { if (ScoreData.buttonContains(x, y, i)) { >>>>>>> int startScore = (int) (startScorePos.getPosition() / ScoreData.getButtonOffset()); int offset = (int) (-startScorePos.getPosition() + startScore * ScoreData.getButtonOffset()); int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { if (ScoreData.buttonContains(x, y - offset, i)) { <<<<<<< float oldHoverOffset = hoverOffset; BeatmapSetNode oldHoverIndex = hoverIndex; ======= int oldHoverOffsetTime = hoverOffset.getTime(); int oldHoverIndex = hoverIndex; >>>>>>> int oldHoverOffsetTime = hoverOffset.getTime(); BeatmapSetNode oldHoverIndex = hoverIndex; <<<<<<< float oldHoverOffset = hoverOffset; BeatmapSetNode oldHoverIndex = hoverIndex; ======= int oldHoverOffsetTime = hoverOffset.getTime(); int oldHoverIndex = hoverIndex; >>>>>>> int oldHoverOffsetTime = hoverOffset.getTime(); BeatmapSetNode oldHoverIndex = hoverIndex; <<<<<<< hoverOffset = 0f; hoverIndex = null; startScorePos.setPosition(0); ======= hoverOffset.setTime(0); hoverIndex = -1; startScore = 0; >>>>>>> hoverOffset.setTime(0); hoverIndex = null; startScorePos.setPosition(0); <<<<<<< // reset state and node references MusicController.reset(); startNode = focusNode = null; scoreMap = null; focusScores = null; oldFocusNode = null; randomStack = new Stack<SongNode>(); songInfo = null; hoverOffset = 0f; hoverIndex = null; search.setText(""); searchTimer = SEARCH_DELAY; searchTransitionTimer = SEARCH_TRANSITION_TIME; searchResultString = null; // reload songs in new thread reloadThread = new Thread() { @Override public void run() { // clear the beatmap cache BeatmapDB.clearDatabase(); // invoke unpacker and parser File beatmapDir = Options.getBeatmapDir(); OszUnpacker.unpackAllFiles(Options.getOSZDir(), beatmapDir); BeatmapParser.parseAllFiles(beatmapDir); // initialize song list if (BeatmapSetList.get().size() > 0) { BeatmapSetList.get().init(); setFocus(BeatmapSetList.get().getRandomNode(), -1, true, true); } else MusicController.playThemeSong(); reloadThread = null; } }; reloadThread.start(); ======= reloadBeatmaps(true); >>>>>>> reloadBeatmaps(true); <<<<<<< /** * Updates the song list data required for drawing. */ private void updateDrawnSongPos() { float songNodePosDrawn = songScrolling.getPosition(); int startNodeIndex = (int) (songNodePosDrawn / buttonOffset); buttonY = -songNodePosDrawn + buttonOffset * startNodeIndex + headerY - DIVIDER_LINE_WIDTH; float max = (BeatmapSetList.get().size() + (focusNode != null ? focusNode.getBeatmapSet().size() : 0)); songScrolling.setMinMax(0 - buttonOffset * 3, (max - MAX_SONG_BUTTONS- 1 + 3) * buttonOffset); //negative startNodeIndex means the first Node is below the header so offset it. if (startNodeIndex <= 0) { startNodeOffset = -startNodeIndex; startNodeIndex = 0; } else { startNodeOffset = 0; ======= int height = container.getHeight(); if (n < 0 && startNode.prev != null) { startNode = startNode.prev; buttonY += buttonOffset / 4; if (buttonY > headerY + height * 0.02f) buttonY = headerY + height * 0.02f; n++; shifted = true; } else if (n > 0 && startNode.next != null && BeatmapSetList.get().getNode(startNode, MAX_SONG_BUTTONS) != null) { startNode = startNode.next; buttonY -= buttonOffset / 4; if (buttonY < headerY - height * 0.02f) buttonY = headerY - height * 0.02f; n--; shifted = true; } else break; } if (shifted) { hoverOffset.setTime(0); hoverIndex = -1; >>>>>>> /** * Updates the song list data required for drawing. */ private void updateDrawnSongPos() { float songNodePosDrawn = songScrolling.getPosition(); int startNodeIndex = (int) (songNodePosDrawn / buttonOffset); buttonY = -songNodePosDrawn + buttonOffset * startNodeIndex + headerY - DIVIDER_LINE_WIDTH; float max = (BeatmapSetList.get().size() + (focusNode != null ? focusNode.getBeatmapSet().size() : 0)); songScrolling.setMinMax(0 - buttonOffset * 3, (max - MAX_SONG_BUTTONS- 1 + 3) * buttonOffset); //negative startNodeIndex means the first Node is below the header so offset it. if (startNodeIndex <= 0) { startNodeOffset = -startNodeIndex; startNodeIndex = 0; } else { startNodeOffset = 0; <<<<<<< hoverOffset = 0f; hoverIndex = null; ======= hoverOffset.setTime(0); hoverIndex = -1; >>>>>>> hoverOffset.setTime(0); hoverIndex = null; <<<<<<< ======= // calculate difficulties calculateStarRatings(node.getBeatmapSet()); // if start node was previously expanded, move it if (startNode != null && startNode.index == expandedIndex) startNode = BeatmapSetList.get().getBaseNode(startNode.index); >>>>>>> // calculate difficulties calculateStarRatings(node.getBeatmapSet()); // if start node was previously expanded, move it if (startNode != null && startNode.index == expandedIndex) startNode = BeatmapSetList.get().getBaseNode(startNode.index); <<<<<<< updateDrawnSongPos(); // make sure focusNode is on the screen int val = focusNode.index + focusNode.beatmapIndex; if (val <= startNode.index) songScrolling.scrollToPosition(val * buttonOffset); else if (val > startNode.index + MAX_SONG_BUTTONS - 1) songScrolling.scrollToPosition((val - MAX_SONG_BUTTONS + 1) * buttonOffset); /* //Centers selected node int val = focusNode.index + focusNode.beatmapIndex - MAX_SONG_BUTTONS/2; songScrolling.scrollToPosition(val * buttonOffset); //*/ /* //Attempts to make all nodes in the set at least visible if( focusNode.index * buttonOffset < songScrolling.getPosition()) songScrolling.scrollToPosition(focusNode.index * buttonOffset); if ( ( focusNode.index + focusNode.getBeatmapSet().size() ) * buttonOffset > songScrolling.getPosition() + footerY - headerY) songScrolling.scrollToPosition((focusNode.index + focusNode.getBeatmapSet().size() ) * buttonOffset - (footerY - headerY)); //*/ ======= // load background image beatmap.loadBackground(); boolean isBgNull = lastBackgroundImage == null || beatmap.bg == null; if ((isBgNull && lastBackgroundImage != beatmap.bg) || (!isBgNull && !beatmap.bg.equals(lastBackgroundImage))) { bgAlpha.setTime(0); lastBackgroundImage = beatmap.bg; } >>>>>>> updateDrawnSongPos(); // make sure focusNode is on the screen int val = focusNode.index + focusNode.beatmapIndex; if (val <= startNode.index) songScrolling.scrollToPosition(val * buttonOffset); else if (val > startNode.index + MAX_SONG_BUTTONS - 1) songScrolling.scrollToPosition((val - MAX_SONG_BUTTONS + 1) * buttonOffset); /* //Centers selected node int val = focusNode.index + focusNode.beatmapIndex - MAX_SONG_BUTTONS/2; songScrolling.scrollToPosition(val * buttonOffset); //*/ /* //Attempts to make all nodes in the set at least visible if( focusNode.index * buttonOffset < songScrolling.getPosition()) songScrolling.scrollToPosition(focusNode.index * buttonOffset); if ( ( focusNode.index + focusNode.getBeatmapSet().size() ) * buttonOffset > songScrolling.getPosition() + footerY - headerY) songScrolling.scrollToPosition((focusNode.index + focusNode.getBeatmapSet().size() ) * buttonOffset - (footerY - headerY)); //*/ // load background image beatmap.loadBackground(); boolean isBgNull = lastBackgroundImage == null || beatmap.bg == null; if ((isBgNull && lastBackgroundImage != beatmap.bg) || (!isBgNull && !beatmap.bg.equals(lastBackgroundImage))) { bgAlpha.setTime(0); lastBackgroundImage = beatmap.bg; }
<<<<<<< server.authenticator.unbanLogin(this); if (usedAuthenticator) { if (guest) { server.authenticator.releaseGuestName(name); } else { server.authenticator.rememberAuthentication(name, getIPAddress()); } } else if (guest) { server.authenticator.rememberGuest(name, getIPAddress()); } server.stats.addOnlineMinutes(this, (int) (System.currentTimeMillis() - connected) / 1000 / 60); server.stats.addDestroyedBlocks(this, blocksDestroyed); server.stats.addPlacedBlocks(this, blocksPlaced); server.stats.save(); ======= server.data.players.stats.add(this, StatField.PLAY_TIME, (int) (System.currentTimeMillis() - connected) / 1000 / 60); server.data.players.stats.add(this, StatField.BLOCKS_DESTROYED, blocksDestroyed); server.data.players.stats.add(this, StatField.BLOCKS_PLACED, blocksPlaced); server.data.save(); >>>>>>> server.authenticator.unbanLogin(this); if (usedAuthenticator) { if (guest) { server.authenticator.releaseGuestName(name); } else { server.authenticator.rememberAuthentication(name, getIPAddress()); } } else if (guest) { server.authenticator.rememberGuest(name, getIPAddress()); } server.data.players.stats.add(this, StatField.PLAY_TIME, (int) (System.currentTimeMillis() - connected) / 1000 / 60); server.data.players.stats.add(this, StatField.BLOCKS_DESTROYED, blocksDestroyed); server.data.players.stats.add(this, StatField.BLOCKS_PLACED, blocksPlaced); server.data.save();
<<<<<<< * @author Jochen Hiller - Bugfix 455434: added default constructor ======= * @author Dennis Nobel - Added channel group id >>>>>>> * @author Jochen Hiller - Bugfix 455434: added default constructor * @author Dennis Nobel - Added channel group id <<<<<<< /** * Default constructor in package scope only. Will allow to instantiate this * class by reflection. Not intended to be used for normal instantiation. */ ChannelUID() { super(); } ======= private static final String CHANNEL_GROUP_SEPERATOR = "#"; >>>>>>> private static final String CHANNEL_GROUP_SEPERATOR = "#"; /** * Default constructor in package scope only. Will allow to instantiate this * class by reflection. Not intended to be used for normal instantiation. */ ChannelUID() { super(); }
<<<<<<< /** The replay import directory. */ private static File replayImportDir; /** The current skin directory (for user skins). */ private static File skinDir; ======= /** The root skin directory. */ private static File skinRootDir; >>>>>>> /** The replay import directory. */ private static File replayImportDir; /** The root skin directory. */ private static File skinRootDir;
<<<<<<< ======= fragment_backup_child_linear = view.findViewById(R.id.fragment_backup_child_linear); /*Buttons*/ >>>>>>> <<<<<<< ======= }else { if (!Config.checkBackup()) {CustomBackUp.setVisibility(View.VISIBLE);} Snackbar.make(fragment_backup_child_linear,"Device not supported",Snackbar.LENGTH_SHORT).show(); } >>>>>>> <<<<<<< ======= } else { if (!Config.checkBackup()) {CustomBackUp.setVisibility(View.VISIBLE);} else { mUploadBackup.setVisibility(View.VISIBLE); mBuildDescription.setVisibility(View.GONE); } Snackbar.make(fragment_backup_child_linear,"Device not supported",Snackbar.LENGTH_SHORT).show(); } >>>>>>> <<<<<<< mBuildDescription.setText("Backed up recovery " + recoveryPath); Snackbar.make(getView(), "Backup Done", Snackbar.LENGTH_LONG) ======= mBuildDescription.setText("Backed up recovery " + RecoveryPath()); Snackbar.make(fragment_backup_child_linear, "Backup Done", Snackbar.LENGTH_LONG) >>>>>>> mBuildDescription.setText("Backed up recovery " + recoveryPath); Snackbar.make(fragment_backup_child_linear, "Backup Done", Snackbar.LENGTH_LONG)
<<<<<<< import org.harctoolbox.guicomponents.*; ======= import org.harctoolbox.girr.Remote; import org.harctoolbox.guicomponents.AmxBeaconListenerPanel; import org.harctoolbox.guicomponents.CopyClipboardText; import org.harctoolbox.guicomponents.ErroneousSelectionException; import org.harctoolbox.guicomponents.GuiUtils; import org.harctoolbox.guicomponents.HarcletFrame; import org.harctoolbox.guicomponents.HelpPopup; import org.harctoolbox.guicomponents.HexCalculator; import org.harctoolbox.guicomponents.IrPlotter; import org.harctoolbox.guicomponents.IrpMasterBean; import org.harctoolbox.guicomponents.LookAndFeelManager; import org.harctoolbox.guicomponents.SelectFile; import org.harctoolbox.guicomponents.TimeFrequencyCalculator; >>>>>>> import org.harctoolbox.girr.Remote; import org.harctoolbox.guicomponents.*;
<<<<<<< private static float diameter; /** The associated OsuHitObject. */ private OsuHitObject hitObject; ======= /** The associated HitObject. */ private HitObject hitObject; >>>>>>> private static float diameter; /** The associated HitObject. */ private HitObject hitObject; <<<<<<< diameter = (108 - (circleSize * 8)); diameter = (diameter * OsuHitObject.getXMultiplier()); // convert from Osupixels (640x480) int diameterInt = (int)diameter; GameImage.HITCIRCLE.setImage(GameImage.HITCIRCLE.getImage().getScaledCopy(diameterInt, diameterInt)); GameImage.HITCIRCLE_OVERLAY.setImage(GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(diameterInt, diameterInt)); GameImage.APPROACHCIRCLE.setImage(GameImage.APPROACHCIRCLE.getImage().getScaledCopy(diameterInt, diameterInt)); ======= int diameter = (int) (104 - (circleSize * 8)); diameter = (int) (diameter * HitObject.getXMultiplier()); // convert from Osupixels (640x480) GameImage.HITCIRCLE.setImage(GameImage.HITCIRCLE.getImage().getScaledCopy(diameter, diameter)); GameImage.HITCIRCLE_OVERLAY.setImage(GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(diameter, diameter)); GameImage.APPROACHCIRCLE.setImage(GameImage.APPROACHCIRCLE.getImage().getScaledCopy(diameter, diameter)); >>>>>>> diameter = (108 - (circleSize * 8)); diameter = (diameter * OsuHitObject.getXMultiplier()); // convert from Osupixels (640x480) int diameterInt = (int)diameter; GameImage.HITCIRCLE.setImage(GameImage.HITCIRCLE.getImage().getScaledCopy(diameterInt, diameterInt)); GameImage.HITCIRCLE_OVERLAY.setImage(GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(diameterInt, diameterInt)); GameImage.APPROACHCIRCLE.setImage(GameImage.APPROACHCIRCLE.getImage().getScaledCopy(diameterInt, diameterInt)); /*int diameter = (int) (104 - (circleSize * 8)); diameter = (int) (diameter * HitObject.getXMultiplier()); // convert from Osupixels (640x480) GameImage.HITCIRCLE.setImage(GameImage.HITCIRCLE.getImage().getScaledCopy(diameter, diameter)); GameImage.HITCIRCLE_OVERLAY.setImage(GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(diameter, diameter)); GameImage.APPROACHCIRCLE.setImage(GameImage.APPROACHCIRCLE.getImage().getScaledCopy(diameter, diameter));*/
<<<<<<< checkForRaw(); if (intro != null || repeat != null || ending != null) { Element rawEl = doc.createElement("raw"); rawEl.setAttribute("frequency", Integer.toString(frequency)); if (dutyCycle > 0) rawEl.setAttribute("dutyCycle", Double.toString(dutyCycle)); element.appendChild(rawEl); processRaw(doc, rawEl, intro, "intro", fatRaw); processRaw(doc, rawEl, repeat, "repeat", fatRaw); processRaw(doc, rawEl, ending, "ending", fatRaw); } } catch (IrpMasterException | NullPointerException ex) { // NullPointerException thrown if irpMaster == null. ======= checkForRaw(); if (intro != null || repeat != null || ending != null) { for (int T = 0; T < numberOfToggleValues(); T++) { Element rawEl = doc.createElement("raw"); rawEl.setAttribute("frequency", Integer.toString(frequency)); if (dutyCycle > 0) rawEl.setAttribute("dutyCycle", Double.toString(dutyCycle)); if (numberOfToggleValues() > 1) rawEl.setAttribute(toggleAttributeName, Integer.toString(T)); element.appendChild(rawEl); processRaw(doc, rawEl, intro[T], "intro", fatRaw); processRaw(doc, rawEl, repeat[T], "repeat", fatRaw); processRaw(doc, rawEl, ending[T], "ending", fatRaw); } } } catch (IrpMasterException ex) { >>>>>>> checkForRaw(); if (intro != null || repeat != null || ending != null) { for (int T = 0; T < numberOfToggleValues(); T++) { Element rawEl = doc.createElement("raw"); rawEl.setAttribute("frequency", Integer.toString(frequency)); if (dutyCycle > 0) rawEl.setAttribute("dutyCycle", Double.toString(dutyCycle)); if (numberOfToggleValues() > 1) rawEl.setAttribute(toggleAttributeName, Integer.toString(T)); element.appendChild(rawEl); processRaw(doc, rawEl, intro[T], "intro", fatRaw); processRaw(doc, rawEl, repeat[T], "repeat", fatRaw); processRaw(doc, rawEl, ending[T], "ending", fatRaw); } } } catch (IrpMasterException | NullPointerException ex) { // NullPointerException thrown if irpMaster == null.
<<<<<<< ======= import org.junit.Rule; >>>>>>> import org.junit.Rule;
<<<<<<< import org.mapstruct.ap.util.Strings; ======= import org.mapstruct.ap.model.source.Method; >>>>>>> import org.mapstruct.ap.model.source.Method; import org.mapstruct.ap.util.Strings;
<<<<<<< if (task.getLoadStatus() == LoadStatus.LOADED) { try { facilityParameters = task.createDefaultParametersAsync().get(); } catch (ExecutionException | InterruptedException e) { e.printStackTrace(); } } else { Alert alert = new Alert(Alert.AlertType.ERROR, "Closest Facility Task Failed to Load!"); alert.show(); ======= try { closestFacilityParameters = task.createDefaultParametersAsync().get(); // set new parameters to find route closestFacilityParameters.setFacilities(facilities); } catch (ExecutionException | InterruptedException e) { e.printStackTrace(); >>>>>>> if (task.getLoadStatus() == LoadStatus.LOADED) { try { closestFacilityParameters = task.createDefaultParametersAsync().get(); // set new parameters to find route closestFacilityParameters.setFacilities(facilities); } catch (ExecutionException | InterruptedException e) { e.printStackTrace(); } } else { Alert alert = new Alert(Alert.AlertType.ERROR, "Closest Facility Task Failed to Load!"); alert.show();
<<<<<<< import hudson.triggers.TimerTrigger; import hudson.triggers.Trigger; import hudson.triggers.TriggerDescriptor; import jenkins.branch.BranchProperty; ======= >>>>>>> import hudson.triggers.TimerTrigger; import hudson.triggers.Trigger; import hudson.triggers.TriggerDescriptor; import jenkins.branch.BranchProperty; <<<<<<< import org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty; import org.jenkinsci.plugins.workflow.properties.MockTrigger; ======= import static org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProjectTest.scheduleAndFindBranchProject; >>>>>>> import org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty; import org.jenkinsci.plugins.workflow.properties.MockTrigger; <<<<<<< import org.jvnet.hudson.test.TestExtension; import org.kohsuke.stapler.DataBoundConstructor; import static org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProjectTest.scheduleAndFindBranchProject; ======= >>>>>>> import org.jvnet.hudson.test.TestExtension; import org.kohsuke.stapler.DataBoundConstructor; import static org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProjectTest.scheduleAndFindBranchProject; <<<<<<< // PipelineTriggersJobProperty is now always going to be present, even if empty. assertEquals(1, tester.configRoundTrip(new JobPropertyStep(Collections.<JobProperty>emptyList())).getProperties().size()); List<JobProperty> properties = tester.configRoundTrip(new JobPropertyStep(Collections.<JobProperty>singletonList(new ParametersDefinitionProperty(new BooleanParameterDefinition("flag", true, null))))).getProperties(); assertEquals(2, properties.size()); ParametersDefinitionProperty pdp = getPropertyFromList(ParametersDefinitionProperty.class, properties); assertNotNull(pdp); ======= properties = tester.configRoundTrip(new JobPropertyStep(properties)).getProperties(); assertEquals(1, properties.size()); assertEquals(ParametersDefinitionProperty.class, properties.get(0).getClass()); ParametersDefinitionProperty pdp = (ParametersDefinitionProperty) properties.get(0); >>>>>>> properties = tester.configRoundTrip(new JobPropertyStep(properties)).getProperties(); assertEquals(1, properties.size()); assertEquals(ParametersDefinitionProperty.class, properties.get(0).getClass()); ParametersDefinitionProperty pdp = (ParametersDefinitionProperty) properties.get(0); <<<<<<< // PipelineTriggersJobProperty is now always going to be present, even if empty. assertEquals(1, tester.configRoundTrip(new JobPropertyStep(Collections.<JobProperty>emptyList())).getProperties().size()); List<JobProperty> properties = tester.configRoundTrip(new JobPropertyStep(Collections.<JobProperty>singletonList(new BuildDiscarderProperty(new LogRotator(1, 2, -1, 3))))).getProperties(); assertEquals(2, properties.size()); BuildDiscarderProperty bdp = getPropertyFromList(BuildDiscarderProperty.class, properties); assertNotNull(bdp); ======= properties = tester.configRoundTrip(new JobPropertyStep(properties)).getProperties(); assertEquals(1, properties.size()); assertEquals(BuildDiscarderProperty.class, properties.get(0).getClass()); BuildDiscarderProperty bdp = (BuildDiscarderProperty) properties.get(0); >>>>>>> properties = tester.configRoundTrip(new JobPropertyStep(properties)).getProperties(); assertEquals(1, properties.size()); assertEquals(BuildDiscarderProperty.class, properties.get(0).getClass()); BuildDiscarderProperty bdp = (BuildDiscarderProperty) properties.get(0);
<<<<<<< ======= import hudson.plugins.mercurial.MercurialInstallation; import hudson.plugins.mercurial.MercurialSCMSource; import hudson.scm.ChangeLogSet; import hudson.tools.ToolProperty; >>>>>>> import hudson.scm.ChangeLogSet;
<<<<<<< import org.junit.After; ======= >>>>>>> import org.junit.After; <<<<<<< @Test public void scmAndEmptyTriggersProperty() throws Exception { WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p"); // Verify the base case behavior. p.setDefinition(new CpsFlowDefinition("echo 'foo'")); assertTrue(p.getTriggers().isEmpty()); r.assertBuildStatusSuccess(p.scheduleBuild2(0)); // Make sure the triggers are still empty. assertTrue(p.getTriggers().isEmpty()); // Now add a trigger. p.setDefinition(new CpsFlowDefinition( (HAVE_SYMBOL ? "properties([pipelineTriggers([\n" + " scm('@daily')])\n" : "properties([pipelineTriggers([[$class: 'SCMTrigger', scmpoll_spec: '@daily']])])\n" ) + "echo 'foo'", true)); WorkflowRun b = r.assertBuildStatusSuccess(p.scheduleBuild2(0)); // Verify that we're seeing warnings due to running 'properties' in a non-multibranch job. r.assertLogContains(Messages.JobPropertyStep__could_remove_warning(), b); // Verify that we're not seeing warnings for any properties being removed, since there are no pre-existing ones. // Note - not using Messages here because we're not actually removing any properties. r.assertLogNotContains("WARNING: Removing existing job property", b); assertEquals(1, p.getTriggers().size()); PipelineTriggersJobProperty triggerProp = p.getTriggersJobProperty(); SCMTrigger scmTrigger = getTriggerFromList(SCMTrigger.class, triggerProp.getTriggers()); assertNotNull(scmTrigger); assertEquals("@daily", scmTrigger.getSpec()); // Now run a properties step with an empty triggers property and verify that we still have a // PipelineTriggersJobProperty, but with no triggers in it. p.setDefinition(new CpsFlowDefinition("properties([pipelineTriggers()])\n" + "echo 'foo'")); WorkflowRun b2 = r.assertBuildStatusSuccess(p.scheduleBuild2(0)); // Verify that we're seeing warnings due to running 'properties' in a non-multibranch job. r.assertLogContains(Messages.JobPropertyStep__could_remove_warning(), b2); // Verify that we *are* seeing warnings for removing the triggers property. String propName = r.jenkins.getDescriptorByType(PipelineTriggersJobProperty.DescriptorImpl.class).getDisplayName(); r.assertLogContains(Messages.JobPropertyStep__removed_property_warning(propName), b2); assertNotNull(p.getTriggersJobProperty()); assertTrue(p.getTriggers().isEmpty()); } ======= @Issue("JENKINS-37477") @Test public void generateHelpTrigger() throws Exception { DescribableModel<?> model = new DescribableModel(PipelineTriggersJobProperty.class); assertNotNull(model); recurseOnModel(model); } /** * TODO: Move to workflow-cps test classes somewhere. */ private void recurseOnTypes(ParameterType type) throws Exception { // For the moment, only care about types with @DataBoundConstructors. if (type instanceof ErrorType && !(((ErrorType)type).getError() instanceof NoStaplerConstructorException)) { throw ((ErrorType)type).getError(); } if (type instanceof ArrayType) { recurseOnTypes(((ArrayType)type).getElementType()); } else if (type instanceof HomogeneousObjectType) { recurseOnModel(((HomogeneousObjectType) type).getSchemaType()); } else if (type instanceof HeterogeneousObjectType) { for (Map.Entry<String, DescribableModel<?>> entry : ((HeterogeneousObjectType) type).getTypes().entrySet()) { recurseOnModel(entry.getValue()); } } } /** * TODO: Move to workflow-cps test classes somewhere. */ private void recurseOnModel(DescribableModel<?> model) throws Exception { for (DescribableParameter param : model.getParameters()) { recurseOnTypes(param.getType()); } } @Issue("JENKINS-37477") @Test public void configRoundTripTrigger() throws Exception { List<JobProperty> properties = Collections.<JobProperty>singletonList(new PipelineTriggersJobProperty(Collections.<Trigger>singletonList(new TimerTrigger("@daily")))); String snippetJson = "{'propertiesMap': {\n" + " 'stapler-class-bag': 'true',\n" + " 'org-jenkinsci-plugins-workflow-job-properties-PipelineTriggersJobProperty': {'triggers': {\n" + " 'stapler-class-bag': 'true',\n" + " 'hudson-triggers-TimerTrigger': {'spec': '@daily'}\n" + " }}},\n" + " 'stapler-class': 'org.jenkinsci.plugins.workflow.multibranch.JobPropertyStep',\n" + " '$class': 'org.jenkinsci.plugins.workflow.multibranch.JobPropertyStep'}"; if (TimerTrigger.DescriptorImpl.class.isAnnotationPresent(Symbol.class)) { new SnippetizerTester(r).assertGenerateSnippet(snippetJson, "properties [pipelineTriggers([cron('@daily')])]", null); // TODO: JENKINS-29711 like other roundtrip tests here. //new SnippetizerTester(r).assertRoundTrip(new JobPropertyStep(properties), "properties [pipelineTriggers([cron('@daily')])]"); } else { new SnippetizerTester(r).assertGenerateSnippet(snippetJson, "properties [pipelineTriggers([[$class: 'TimerTrigger', spec: '@daily']])]", null); // TODO: JENKINS-29711 like other roundtrip tests here. //new SnippetizerTester(r).assertRoundTrip(new JobPropertyStep(properties), "properties [pipelineTriggers([[$class: 'TimerTrigger', spec: '@daily']])]"); } } >>>>>>> @Test public void scmAndEmptyTriggersProperty() throws Exception { WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p"); // Verify the base case behavior. p.setDefinition(new CpsFlowDefinition("echo 'foo'")); assertTrue(p.getTriggers().isEmpty()); r.assertBuildStatusSuccess(p.scheduleBuild2(0)); // Make sure the triggers are still empty. assertTrue(p.getTriggers().isEmpty()); // Now add a trigger. p.setDefinition(new CpsFlowDefinition( (HAVE_SYMBOL ? "properties([pipelineTriggers([\n" + " scm('@daily')])\n" : "properties([pipelineTriggers([[$class: 'SCMTrigger', scmpoll_spec: '@daily']])])\n" ) + "echo 'foo'", true)); WorkflowRun b = r.assertBuildStatusSuccess(p.scheduleBuild2(0)); // Verify that we're seeing warnings due to running 'properties' in a non-multibranch job. r.assertLogContains(Messages.JobPropertyStep__could_remove_warning(), b); // Verify that we're not seeing warnings for any properties being removed, since there are no pre-existing ones. // Note - not using Messages here because we're not actually removing any properties. r.assertLogNotContains("WARNING: Removing existing job property", b); assertEquals(1, p.getTriggers().size()); PipelineTriggersJobProperty triggerProp = p.getTriggersJobProperty(); SCMTrigger scmTrigger = getTriggerFromList(SCMTrigger.class, triggerProp.getTriggers()); assertNotNull(scmTrigger); assertEquals("@daily", scmTrigger.getSpec()); // Now run a properties step with an empty triggers property and verify that we still have a // PipelineTriggersJobProperty, but with no triggers in it. p.setDefinition(new CpsFlowDefinition("properties([pipelineTriggers()])\n" + "echo 'foo'")); WorkflowRun b2 = r.assertBuildStatusSuccess(p.scheduleBuild2(0)); // Verify that we're seeing warnings due to running 'properties' in a non-multibranch job. r.assertLogContains(Messages.JobPropertyStep__could_remove_warning(), b2); // Verify that we *are* seeing warnings for removing the triggers property. String propName = r.jenkins.getDescriptorByType(PipelineTriggersJobProperty.DescriptorImpl.class).getDisplayName(); r.assertLogContains(Messages.JobPropertyStep__removed_property_warning(propName), b2); assertNotNull(p.getTriggersJobProperty()); assertTrue(p.getTriggers().isEmpty()); } @Issue("JENKINS-37477") @Test public void generateHelpTrigger() throws Exception { DescribableModel<?> model = new DescribableModel(PipelineTriggersJobProperty.class); assertNotNull(model); recurseOnModel(model); } /** * TODO: Move to workflow-cps test classes somewhere. */ private void recurseOnTypes(ParameterType type) throws Exception { // For the moment, only care about types with @DataBoundConstructors. if (type instanceof ErrorType && !(((ErrorType)type).getError() instanceof NoStaplerConstructorException)) { throw ((ErrorType)type).getError(); } if (type instanceof ArrayType) { recurseOnTypes(((ArrayType)type).getElementType()); } else if (type instanceof HomogeneousObjectType) { recurseOnModel(((HomogeneousObjectType) type).getSchemaType()); } else if (type instanceof HeterogeneousObjectType) { for (Map.Entry<String, DescribableModel<?>> entry : ((HeterogeneousObjectType) type).getTypes().entrySet()) { recurseOnModel(entry.getValue()); } } } /** * TODO: Move to workflow-cps test classes somewhere. */ private void recurseOnModel(DescribableModel<?> model) throws Exception { for (DescribableParameter param : model.getParameters()) { recurseOnTypes(param.getType()); } } @Issue("JENKINS-37477") @Test public void configRoundTripTrigger() throws Exception { List<JobProperty> properties = Collections.<JobProperty>singletonList(new PipelineTriggersJobProperty(Collections.<Trigger>singletonList(new TimerTrigger("@daily")))); String snippetJson = "{'propertiesMap': {\n" + " 'stapler-class-bag': 'true',\n" + " 'org-jenkinsci-plugins-workflow-job-properties-PipelineTriggersJobProperty': {'triggers': {\n" + " 'stapler-class-bag': 'true',\n" + " 'hudson-triggers-TimerTrigger': {'spec': '@daily'}\n" + " }}},\n" + " 'stapler-class': 'org.jenkinsci.plugins.workflow.multibranch.JobPropertyStep',\n" + " '$class': 'org.jenkinsci.plugins.workflow.multibranch.JobPropertyStep'}"; if (TimerTrigger.DescriptorImpl.class.isAnnotationPresent(Symbol.class)) { new SnippetizerTester(r).assertGenerateSnippet(snippetJson, "properties [pipelineTriggers([cron('@daily')])]", null); // TODO: JENKINS-29711 like other roundtrip tests here. //new SnippetizerTester(r).assertRoundTrip(new JobPropertyStep(properties), "properties [pipelineTriggers([cron('@daily')])]"); } else { new SnippetizerTester(r).assertGenerateSnippet(snippetJson, "properties [pipelineTriggers([[$class: 'TimerTrigger', spec: '@daily']])]", null); // TODO: JENKINS-29711 like other roundtrip tests here. //new SnippetizerTester(r).assertRoundTrip(new JobPropertyStep(properties), "properties [pipelineTriggers([[$class: 'TimerTrigger', spec: '@daily']])]"); } }
<<<<<<< import hudson.model.RootAction; import hudson.model.TaskListener; ======= >>>>>>> import hudson.model.TaskListener; <<<<<<< import org.apache.commons.io.FileUtils; import static org.hamcrest.Matchers.*; ======= >>>>>>> import static org.hamcrest.Matchers.*; <<<<<<< private static void assertRevisionAction(WorkflowRun build) { ======= static void assertRevisionAction(WorkflowRun build) { BuildData data = build.getAction(BuildData.class); assertNotNull(data); >>>>>>> static void assertRevisionAction(WorkflowRun build) {
<<<<<<< import org.jenkinsci.Symbol; ======= import jenkins.plugins.git.GitSampleRepoRule; >>>>>>> import jenkins.plugins.git.GitSampleRepoRule; import org.jenkinsci.Symbol; <<<<<<< import org.jenkinsci.plugins.workflow.cps.SnippetizerTester; ======= import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition; >>>>>>> import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
<<<<<<< import android.graphics.PorterDuff; ======= import android.graphics.Paint; >>>>>>> import android.graphics.Paint; <<<<<<< ======= >>>>>>>
<<<<<<< if (t9InputViewGroup.isShown()){ t9InputViewGroup.clearAnimation(); t9InputViewGroup.startAnimation(anim);} ======= if (t9InputViewGroup.isShown()){ t9InputViewGroup.clearAnimation(); t9InputViewGroup.startAnimation(anim); } >>>>>>> if (t9InputViewGroup.isShown()){ t9InputViewGroup.clearAnimation(); t9InputViewGroup.startAnimation(anim); } <<<<<<< //transparencyHandle.DownAlpha(); ======= >>>>>>> //transparencyHandle.DownAlpha();
<<<<<<< if (functionViewGroup.isShown()) functionViewGroup.startAnimation(anim); if (specialSymbolChooseViewGroup.isShown()) specialSymbolChooseViewGroup.startAnimation(anim); if (quickSymbolViewGroup.isShown()) quickSymbolViewGroup.startAnimation(anim); if (prefixViewGroup.isShown()) prefixViewGroup.startAnimation(anim); preEditPopup.setButtonAlpha(autoDownAlphaTop); ======= if (functionViewGroup.isShown()) { functionViewGroup.clearAnimation(); functionViewGroup.startAnimation(anim);} if (specialSymbolChooseViewGroup.isShown()) { specialSymbolChooseViewGroup.clearAnimation(); specialSymbolChooseViewGroup.startAnimation(anim);} if (quickSymbolViewGroup.isShown()) { quickSymbolViewGroup.clearAnimation(); quickSymbolViewGroup.startAnimation(anim);} if (prefixViewGroup.isShown()) { prefixViewGroup.clearAnimation(); prefixViewGroup.startAnimation(anim);} >>>>>>> preEditPopup.setButtonAlpha(autoDownAlphaTop);
<<<<<<< ======= >>>>>>> import org.kframework.utils.StringUtil; <<<<<<< this.sort = element.getAttribute(Constants.SORT_sort_ATTR); this.userTyped = Boolean.parseBoolean(element.getAttribute(Constants.TYPE_userTyped_ATTR)); this.separator = separator; ======= this.sort = Sort.of(element.getAttribute(Constants.SORT_sort_ATTR)); this.separator = separator; >>>>>>> this.sort = Sort.of(element.getAttribute(Constants.SORT_sort_ATTR)); this.userTyped = Boolean.parseBoolean(element.getAttribute(Constants.TYPE_userTyped_ATTR)); this.separator = separator;
<<<<<<< Grammar grammar = (Grammar) BinaryLoader.instance().loadOrDie(Grammar.class, context.kompiled.getAbsolutePath() + "/pgm/newParser.bin"); ======= Grammar grammar = BinaryLoader.loadOrDie(Grammar.class, context.kompiled.getAbsolutePath() + "/pgm/newParser.bin"); >>>>>>> Grammar grammar = BinaryLoader.instance().loadOrDie(Grammar.class, context.kompiled.getAbsolutePath() + "/pgm/newParser.bin");
<<<<<<< public static org.kframework.definition.Definition from(String definitionText) throws IOException { Pattern pattern = Pattern.compile("module ([A-Z_]*)"); ======= public static org.kframework.definition.Definition from(String definitionText) { Pattern pattern = Pattern.compile("(?:^|\\s)module ([A-Z][A-Z\\-]*)"); >>>>>>> public static org.kframework.definition.Definition from(String definitionText) throws IOException { Pattern pattern = Pattern.compile("(?:^|\\s)module ([A-Z][A-Z\\-]*)");
<<<<<<< import java.util.Map; ======= import java.util.List; >>>>>>> import java.util.List; import java.util.Map; <<<<<<< Injector injector = buildInjector(argv); injector.getInstance(Executor.Tool.class); } @Test public void testCreateInjectionLtl() { String[] argv = new String[] { "foo.c", "--ltlmc", "TrueLtl" }; Injector injector = buildInjector(argv); injector.getInstance(LtlModelChecker.Tool.class); } @Test public void testCreateInjectionDebuggerPretty() { String[] argv = new String[] { "foo.c", "--debugger" }; Injector injector = buildInjector(argv); injector.getInstance(Debugger.Tool.class); } @Test public void testCreateInjectionDebuggerKast() { String[] argv = new String[] { "foo.c", "--debugger", "--output", "kast" }; Injector injector = buildInjector(argv); injector.getInstance(Key.get(new TypeLiteral<TransformationProvider<Transformation<SearchResult, Map<String, Term>>>>() {})); injector.getInstance(Debugger.Tool.class); } @Test public void testCreateInjectionDebuggerRaw() { String[] argv = new String[] { "foo.c", "--debugger", "--output", "raw" }; Injector injector = buildInjector(argv); try { injector.getInstance(Debugger.Tool.class); } catch (ProvisionException e) { for (Message msg : e.getErrorMessages()) { msg.getCause().printStackTrace(); } throw e; } } @Test public void testCreateInjectionGuiDebugger() { String[] argv = new String[] { "foo.c", "--debugger-gui" }; Injector injector = buildInjector(argv); injector.getInstance(GuiDebugger.class); } private Injector buildInjector(String[] argv) { Module[] definitionSpecificModules = KRunFrontEnd.getDefinitionSpecificModules(argv); Module definitionSpecificModuleOverride = Modules.override(definitionSpecificModules).with(new TestModule()); Module[] modules = KRunFrontEnd.getModules(argv, definitionSpecificModuleOverride); Injector injector = Guice.createInjector(modules); ======= List<Module> modules = KRunFrontEnd.getModules(argv); Injector injector = Guice.createInjector(Modules.override(modules).with(new TestModule())); >>>>>>> Injector injector = buildInjector(argv); injector.getInstance(Executor.Tool.class); } @Test public void testCreateInjectionLtl() { String[] argv = new String[] { "foo.c", "--ltlmc", "TrueLtl" }; Injector injector = buildInjector(argv); injector.getInstance(LtlModelChecker.Tool.class); } @Test public void testCreateInjectionDebuggerPretty() { String[] argv = new String[] { "foo.c", "--debugger" }; Injector injector = buildInjector(argv); injector.getInstance(Debugger.Tool.class); } @Test public void testCreateInjectionDebuggerKast() { String[] argv = new String[] { "foo.c", "--debugger", "--output", "kast" }; Injector injector = buildInjector(argv); injector.getInstance(Key.get(new TypeLiteral<TransformationProvider<Transformation<SearchResult, Map<String, Term>>>>() {})); injector.getInstance(Debugger.Tool.class); } @Test public void testCreateInjectionDebuggerRaw() { String[] argv = new String[] { "foo.c", "--debugger", "--output", "raw" }; Injector injector = buildInjector(argv); try { injector.getInstance(Debugger.Tool.class); } catch (ProvisionException e) { for (Message msg : e.getErrorMessages()) { msg.getCause().printStackTrace(); } throw e; } } @Test public void testCreateInjectionGuiDebugger() { String[] argv = new String[] { "foo.c", "--debugger-gui" }; Injector injector = buildInjector(argv); injector.getInstance(GuiDebugger.class); } private Injector buildInjector(String[] argv) { Module[] definitionSpecificModules = KRunFrontEnd.getDefinitionSpecificModules(argv); Module definitionSpecificModuleOverride = Modules.override(definitionSpecificModules).with(new TestModule()); List<Module> modules = KRunFrontEnd.getModules(argv, definitionSpecificModuleOverride); Injector injector = Guice.createInjector(modules); <<<<<<< Module[] modules = KRunFrontEnd.getModules(argv, KRunFrontEnd.getDefinitionSpecificModules(argv)); ======= List<Module> modules = KRunFrontEnd.getModules(argv); >>>>>>> List<Module> modules = KRunFrontEnd.getModules(argv, KRunFrontEnd.getDefinitionSpecificModules(argv));
<<<<<<< candidate.expandPatternsAndSimplify(true); ======= if (!isMatching) { candidate.expandPatterns(true); candidate.simplify(); } >>>>>>> if (!isMatching) { candidate.expandPatternsAndSimplify(true); }
<<<<<<< try { if (sort.operatorLabels().get("update").equals(kLabelConstant.getLabel())) { return new MapUpdate( (Variable) kList.getContents().get(0), Collections.<Term, Term>emptyMap(), Collections.singletonMap( kList.getContents().get(1), kList.getContents().get(2))); } } catch (Exception e) { } return super.visit(node, _); ======= if (kLabelConstant.getLabel().equals(sort.operatorLabels().get("update")) && kList.getContents().size() >= 3) { return new MapUpdate( (Variable) kList.getContents().get(0), Collections.<Term, Term>emptyMap(), Collections.singletonMap( kList.getContents().get(1), kList.getContents().get(2))); } return super.transform(node); >>>>>>> if (kLabelConstant.getLabel().equals(sort.operatorLabels().get("update")) && kList.getContents().size() >= 3) { return new MapUpdate( (Variable) kList.getContents().get(0), Collections.<Term, Term>emptyMap(), Collections.singletonMap( kList.getContents().get(1), kList.getContents().get(2))); } return super.visit(node, _);
<<<<<<< boolean dropQuote) throws IOException { ======= boolean dropQuote, boolean autoImportDomains) { >>>>>>> boolean dropQuote, boolean autoImportDomains) throws IOException { <<<<<<< boolean dropQuote) throws IOException { return loadDefinition(mainModuleName, syntaxModuleName, definitionText, Source.apply(source.getAbsolutePath()), currentDirectory, lookupDirectories, dropQuote); } public org.kframework.definition.Definition loadDefinition( String mainModuleName, String syntaxModuleName, String definitionText, Source source, File currentDirectory, List<File> lookupDirectories, boolean dropQuote) throws IOException { Set<Module> modules = loadModules(new HashSet<>(), definitionText, source, currentDirectory, lookupDirectories, dropQuote); ======= boolean dropQuote, boolean autoImportDomains) { Set<Module> modules = loadModules(new HashSet<>(), definitionText, source, currentDirectory, lookupDirectories, dropQuote, autoImportDomains); >>>>>>> boolean dropQuote, boolean autoImportDomains) throws IOException { return loadDefinition(mainModuleName, syntaxModuleName, definitionText, Source.apply(source.getAbsolutePath()), currentDirectory, lookupDirectories, dropQuote, autoImportDomains); } public org.kframework.definition.Definition loadDefinition( String mainModuleName, String syntaxModuleName, String definitionText, Source source, File currentDirectory, List<File> lookupDirectories, boolean dropQuote, boolean autoImportDomains) throws IOException { Set<Module> modules = loadModules(new HashSet<>(), definitionText, source, currentDirectory, lookupDirectories, dropQuote, autoImportDomains);
<<<<<<< String parsed = null; if (ss.containsAttribute("kore")) { long koreStartTime = System.currentTimeMillis(); parsed = org.kframework.parser.concrete.KParser.ParseKoreString(ss.getContent()); if (globalOptions.verbose) System.out.println("Parsing with Kore: " + ss.getFilename() + ":" + ss.getLocation() + " - " + (System.currentTimeMillis() - koreStartTime)); } else parsed = org.kframework.parser.concrete.KParser.ParseKConfigString(ss.getContent()); Document doc = XmlLoader.getXMLDoc(parsed); // replace the old xml node with the newly parsed sentence Node xmlTerm = doc.getFirstChild().getFirstChild().getNextSibling(); XmlLoader.updateLocation(xmlTerm, XmlLoader.getLocNumber(ss.getContentLocation(), 0), XmlLoader.getLocNumber(ss.getContentLocation(), 1)); XmlLoader.addFilename(xmlTerm, ss.getFilename()); XmlLoader.reportErrors(doc, ss.getType()); if (ss.getType().equals(Constants.CONTEXT)) config = new org.kframework.kil.Context((Sentence) JavaClassesFactory.getTerm((Element) xmlTerm)); else if (ss.getType().equals(Constants.RULE)) config = new Rule((Sentence) JavaClassesFactory.getTerm((Element) xmlTerm)); else { // should not reach here config = null; assert false : "Only context and rules have been implemented."; ======= if (experimentalParserOptions.fastKast) { // TODO(RaduM): load directly from ATerms ASTNode anode = Sglr.run_sglri(context.dotk.getAbsolutePath() + "/def/Concrete.tbl", "CondSentence", ss.getContent(), ss.getFilename()); int startLine = StringUtil.getStartLineFromLocation(ss.getContentLocation()); int startCol = StringUtil.getStartColFromLocation(ss.getContentLocation()); new UpdateLocationVisitor(context, startLine, startCol).visitNode(anode); new ReportErrorsVisitor(context, "rule").visitNode(anode); Sentence st = (Sentence) anode; if (ss.getType().equals(Constants.CONTEXT)) config = new org.kframework.kil.Context(st); else if (ss.getType().equals(Constants.RULE)) config = new Rule(st); else { // should not reach here config = null; assert false : "Only context and rules have been implemented."; } ((Sentence) config).setLabel(ss.getLabel()); //assert st.getAttributes() == null || st.getAttributes().isEmpty(); // attributes should have been parsed in Basic Parsing ((Sentence) config).setAttributes(ss.getAttributes()); } else { String parsed = null; if (ss.containsAttribute("kore")) { long koreStartTime = System.currentTimeMillis(); parsed = org.kframework.parser.concrete.KParser.ParseKoreString(ss.getContent()); if (globalOptions.verbose) System.out.println("Parsing with Kore: " + ss.getFilename() + ":" + ss.getLocation() + " - " + (System.currentTimeMillis() - koreStartTime)); } else parsed = org.kframework.parser.concrete.KParser.ParseKConfigString(ss.getContent()); Document doc = XmlLoader.getXMLDoc(parsed); // replace the old xml node with the newly parsed sentence Node xmlTerm = doc.getFirstChild().getFirstChild().getNextSibling(); XmlLoader.updateLocation(xmlTerm, XmlLoader.getLocNumber(ss.getContentLocation(), 0), XmlLoader.getLocNumber(ss.getContentLocation(), 1)); XmlLoader.addFilename(xmlTerm, ss.getFilename()); XmlLoader.reportErrors(doc, ss.getType()); if (ss.getType().equals(Constants.CONTEXT)) config = new org.kframework.kil.Context((Sentence) JavaClassesFactory.getTerm((Element) xmlTerm)); else if (ss.getType().equals(Constants.RULE)) config = new Rule((Sentence) JavaClassesFactory.getTerm((Element) xmlTerm)); else { // should not reach here config = null; assert false : "Only context and rules have been implemented."; } Sentence st = (Sentence) config; assert st.getLabel().equals(""); // labels should have been parsed in Basic Parsing st.setLabel(ss.getLabel()); //assert st.getAttributes() == null || st.getAttributes().isEmpty(); // attributes should have been parsed in Basic Parsing st.setAttributes(ss.getAttributes()); >>>>>>> String parsed = null; if (ss.containsAttribute("kore")) { long koreStartTime = System.currentTimeMillis(); parsed = org.kframework.parser.concrete.KParser.ParseKoreString(ss.getContent()); if (globalOptions.verbose) System.out.println("Parsing with Kore: " + ss.getFilename() + ":" + ss.getLocation() + " - " + (System.currentTimeMillis() - koreStartTime)); } else parsed = org.kframework.parser.concrete.KParser.ParseKConfigString(ss.getContent()); Document doc = XmlLoader.getXMLDoc(parsed); // replace the old xml node with the newly parsed sentence Node xmlTerm = doc.getFirstChild().getFirstChild().getNextSibling(); XmlLoader.updateLocation(xmlTerm, XmlLoader.getLocNumber(ss.getContentLocation(), 0), XmlLoader.getLocNumber(ss.getContentLocation(), 1)); XmlLoader.addFilename(xmlTerm, ss.getFilename()); XmlLoader.reportErrors(doc, ss.getType()); if (ss.getType().equals(Constants.CONTEXT)) config = new org.kframework.kil.Context((Sentence) JavaClassesFactory.getTerm((Element) xmlTerm)); else if (ss.getType().equals(Constants.RULE)) config = new Rule((Sentence) JavaClassesFactory.getTerm((Element) xmlTerm)); else { // should not reach here config = null; assert false : "Only context and rules have been implemented."; <<<<<<< config = config.accept(new InclusionFilter(localModule, context)); config = config.accept(new CellTypesFilter(context)); config = config.accept(new CorrectRewritePriorityFilter(context)); config = config.accept(new CorrectKSeqFilter(context)); config = config.accept(new CorrectCastPriorityFilter(context)); // config = config.accept(new CheckBinaryPrecedenceFilter()); config = config.accept(new PriorityFilter(context)); config = config.accept(new VariableTypeInferenceFilter(context)); // config = config.accept(new AmbDuplicateFilter(context)); // config = config.accept(new TypeSystemFilter(context)); // config = config.accept(new BestFitFilter(new GetFitnessUnitTypeCheckVisitor(context), context)); // config = config.accept(new TypeInferenceSupremumFilter(context)); config = config.accept(new BestFitFilter(new GetFitnessUnitKCheckVisitor(context), context)); config = config.accept(new PreferAvoidFilter(context)); config = config.accept(new FlattenListsFilter(context)); config = config.accept(new AmbDuplicateFilter(context)); ======= config = new InclusionFilter(localModule, context).visitNode(config); config = new CellTypesFilter(context).visitNode(config); config = new CorrectRewritePriorityFilter(context).visitNode(config); config = new CorrectKSeqFilter(context).visitNode(config); config = new CorrectCastPriorityFilter(context).visitNode(config); // config = new CheckBinaryPrecedenceFilter().visitNode(config); config = new PriorityFilter(context).visitNode(config); if (experimentalParserOptions.fastKast) config = new MergeAmbFilter(context).visitNode(config); config = new VariableTypeInferenceFilter(context).visitNode(config); // config = new AmbDuplicateFilter(context).visitNode(config); // config = new TypeSystemFilter(context).visitNode(config); // config = new BestFitFilter(new GetFitnessUnitTypeCheckVisitor(context), context).visitNode(config); // config = new TypeInferenceSupremumFilter(context).visitNode(config); config = new BestFitFilter(new GetFitnessUnitKCheckVisitor(context), context).visitNode(config); config = new PreferAvoidFilter(context).visitNode(config); config = new FlattenListsFilter(context).visitNode(config); config = new AmbDuplicateFilter(context).visitNode(config); >>>>>>> config = new InclusionFilter(localModule, context).visitNode(config); config = new CellTypesFilter(context).visitNode(config); config = new CorrectRewritePriorityFilter(context).visitNode(config); config = new CorrectKSeqFilter(context).visitNode(config); config = new CorrectCastPriorityFilter(context).visitNode(config); // config = new CheckBinaryPrecedenceFilter().visitNode(config); config = new PriorityFilter(context).visitNode(config); config = new VariableTypeInferenceFilter(context).visitNode(config); // config = new AmbDuplicateFilter(context).visitNode(config); // config = new TypeSystemFilter(context).visitNode(config); // config = new BestFitFilter(new GetFitnessUnitTypeCheckVisitor(context), context).visitNode(config); // config = new TypeInferenceSupremumFilter(context).visitNode(config); config = new BestFitFilter(new GetFitnessUnitKCheckVisitor(context), context).visitNode(config); config = new PreferAvoidFilter(context).visitNode(config); config = new FlattenListsFilter(context).visitNode(config); config = new AmbDuplicateFilter(context).visitNode(config);
<<<<<<< sdf.append(" " + StringUtil.escapeSortName(si.getSort().getName()) + " \"" + si.getSeparator() + "\" " + StringUtil.escapeSortName(p.getSort().getName()) + " -> " + StringUtil.escapeSortName(p.getSort().getName())); ======= sdf.append(" " + StringUtil.escapeSortName(si.getSort()) + " " + StringUtil.enquoteCString(si.getSeparator()) + " " + StringUtil.escapeSortName(p.getSort()) + " -> " + StringUtil.escapeSortName(p.getSort())); >>>>>>> sdf.append(" " + StringUtil.escapeSortName(si.getSort().getName()) + " " + StringUtil.enquoteCString(si.getSeparator()) + " " + StringUtil.escapeSortName(p.getSort().getName()) + " -> " + StringUtil.escapeSortName(p.getSort().getName())); <<<<<<< sdf.append("\"" + StringUtil.escape(t.getTerminal()) + "\" "); } else if (itm instanceof NonTerminal) { NonTerminal srt = (NonTerminal) itm; ======= sdf.append(StringUtil.enquoteCString(t.getTerminal()) + " "); } else if (itm instanceof Sort) { Sort srt = (Sort) itm; >>>>>>> sdf.append(StringUtil.enquoteCString(t.getTerminal()) + " "); } else if (itm instanceof NonTerminal) { NonTerminal srt = (NonTerminal) itm; <<<<<<< sdf.append(" \"" + StringUtil.escape(t) + "\" -> " + StringUtil.escapeSortName(p.getSort().getName()) + "Dz {reject}\n"); ======= sdf.append(" " + StringUtil.enquoteCString(t) + " -> " + StringUtil.escapeSortName(p.getSort()) + "Dz {reject}\n"); >>>>>>> sdf.append(" " + StringUtil.enquoteCString(t) + " -> " + StringUtil.escapeSortName(p.getSort().getName()) + "Dz {reject}\n"); <<<<<<< sdf.append(" \"" + StringUtil.escape(t) + "\" -> " + StringUtil.escapeSortName(p.getSort().getName()) + "Dz {reject}\n"); ======= sdf.append(" " + StringUtil.enquoteCString(t) + " -> " + StringUtil.escapeSortName(p.getSort()) + "Dz {reject}\n"); >>>>>>> sdf.append(" " + StringUtil.enquoteCString(t) + " -> " + StringUtil.escapeSortName(p.getSort().getName()) + "Dz {reject}\n");
<<<<<<< import java.util.ArrayList; ======= import java.io.File; >>>>>>> import java.util.ArrayList; import java.io.File;
<<<<<<< UninterpretedConstraint lookups = new UninterpretedConstraint(); for (org.kframework.kil.BuiltinLookup lookup : node.getAttribute(JavaBackendRuleData.class).getLookups()) { ======= UninterpretedConstraint.Builder lookupsBuilder = UninterpretedConstraint.builder(); for (org.kframework.kil.BuiltinLookup lookup : node.getLookups()) { >>>>>>> UninterpretedConstraint.Builder lookupsBuilder = UninterpretedConstraint.builder(); for (org.kframework.kil.BuiltinLookup lookup : node.getAttribute(JavaBackendRuleData.class).getLookups()) { <<<<<<< java.util.Map<String, Term> lhsOfReadCell = null; java.util.Map<String, Term> rhsOfWriteCell = null; if (node.getAttribute(JavaBackendRuleData.class).isCompiledForFastRewriting()) { ======= java.util.Map<CellLabel, Term> lhsOfReadCell = null; java.util.Map<CellLabel, Term> rhsOfWriteCell = null; if (node.isCompiledForFastRewriting()) { >>>>>>> java.util.Map<CellLabel, Term> lhsOfReadCell = null; java.util.Map<CellLabel, Term> rhsOfWriteCell = null; if (node.getAttribute(JavaBackendRuleData.class).isCompiledForFastRewriting()) { <<<<<<< for (java.util.Map.Entry<String, org.kframework.kil.Term> entry : node.getAttribute(JavaBackendRuleData.class).getLhsOfReadCell().entrySet()) { lhsOfReadCell.put(entry.getKey(), (Term) this.visitNode(entry.getValue())); ======= for (java.util.Map.Entry<String, org.kframework.kil.Term> entry : node.getLhsOfReadCell().entrySet()) { lhsOfReadCell.put(CellLabel.of(entry.getKey()), (Term) this.visitNode(entry.getValue())); >>>>>>> for (java.util.Map.Entry<String, org.kframework.kil.Term> entry : node.getAttribute(JavaBackendRuleData.class).getLhsOfReadCell().entrySet()) { lhsOfReadCell.put(CellLabel.of(entry.getKey()), (Term) this.visitNode(entry.getValue())); <<<<<<< for (java.util.Map.Entry<String, org.kframework.kil.Term> entry : node.getAttribute(JavaBackendRuleData.class).getRhsOfWriteCell().entrySet()) { rhsOfWriteCell.put(entry.getKey(), (Term) this.visitNode(entry.getValue())); ======= for (java.util.Map.Entry<String, org.kframework.kil.Term> entry : node.getRhsOfWriteCell().entrySet()) { rhsOfWriteCell.put(CellLabel.of(entry.getKey()), (Term) this.visitNode(entry.getValue())); } } java.util.Set<CellLabel> cellsToCopy = null; if (node.getCellsToCopy() != null) { cellsToCopy = Sets.newHashSet(); for (String cellLabelName : node.getCellsToCopy()) { cellsToCopy.add(CellLabel.of(cellLabelName)); >>>>>>> for (java.util.Map.Entry<String, org.kframework.kil.Term> entry : node.getAttribute(JavaBackendRuleData.class).getRhsOfWriteCell().entrySet()) { rhsOfWriteCell.put(CellLabel.of(entry.getKey()), (Term) this.visitNode(entry.getValue())); } } java.util.Set<CellLabel> cellsToCopy = null; if (node.getAttribute(JavaBackendRuleData.class).getCellsToCopy() != null) { cellsToCopy = Sets.newHashSet(); for (String cellLabelName : node.getAttribute(JavaBackendRuleData.class).getCellsToCopy()) { cellsToCopy.add(CellLabel.of(cellLabelName)); <<<<<<< lookups, node.getAttribute(JavaBackendRuleData.class).isCompiledForFastRewriting(), ======= lookupsBuilder.build(), node.isCompiledForFastRewriting(), >>>>>>> lookupsBuilder.build(), node.getAttribute(JavaBackendRuleData.class).isCompiledForFastRewriting(), <<<<<<< node.getAttribute(JavaBackendRuleData.class).getCellsToCopy(), node.getAttribute(JavaBackendRuleData.class).getInstructions(), ======= cellsToCopy, node.getInstructions(), >>>>>>> cellsToCopy, node.getAttribute(JavaBackendRuleData.class).getInstructions(),
<<<<<<< ======= private final boolean noRHS; private enum Status { LHS, RHS, CONDITION } private Status status; >>>>>>> <<<<<<< assert node.getBody() instanceof Rewrite : "expected rewrite at the top of rule\n" + node + "\n" + "CompileDataStructures pass should be applied after ResolveRewrite pass"; Rewrite rewrite = (Rewrite) node.getBody(); Term lhs = (Term) this.visitNode(rewrite.getLeft()); Term rhs = (Term) this.visitNode(rewrite.getRight()); ======= boolean change = false; Term body = node.getBody(); if (! noRHS) { // Regular rule assert body instanceof Rewrite : "expected rewrite at the top of rule\n" + node + "\n" + "CompileDataStructures pass should be applied after ResolveRewrite pass"; Rewrite rewrite = (Rewrite) body; status = Status.LHS; Term lhs = (Term) this.visitNode(rewrite.getLeft()); status = Status.RHS; Term rhs = (Term) this.visitNode(rewrite.getRight()); if (lhs != rewrite.getLeft() || rhs != rewrite.getRight()) { change = true; rewrite = rewrite.shallowCopy(); rewrite.setLeft(lhs, context); rewrite.setRight(rhs, context); body = rewrite; } } else { // Krun "rule" status = Status.LHS; body = (Term) this.visitNode(body); if (body != node.getBody()) { change = true; } } >>>>>>> boolean change = false; Term body; if (node.getBody() instanceof Rewrite) { Rewrite rewrite = (Rewrite) node.getBody(); Term lhs = (Term) this.visitNode(rewrite.getLeft()); Term rhs = (Term) this.visitNode(rewrite.getRight()); if (lhs != rewrite.getLeft() || rhs != rewrite.getRight()) { rewrite = rewrite.shallowCopy(); rewrite.setLeft(lhs, context); rewrite.setRight(rhs, context); change = true; } body = rewrite; } else { body = (Term) this.visitNode(node.getBody()); }
<<<<<<< // Copyright (C) 2012-2014 K Team. All Rights Reserved. ======= // Copyright (c) 2013-2014 K Team. All Rights Reserved. >>>>>>> // Copyright (c) 2012-2014 K Team. All Rights Reserved.
<<<<<<< ======= private String autoincludeFileName; private KompileOptions kompileOptions; private GlobalOptions globalOptions; >>>>>>> private KompileOptions kompileOptions; private GlobalOptions globalOptions; <<<<<<< ======= this.kompileOptions = kompileOptions; this.globalOptions = kompileOptions.global; if (this.kompileOptions.backend.java()) autoincludeFileName = "autoinclude-java.k"; else autoincludeFileName ="autoinclude.k"; >>>>>>> this.kompileOptions = kompileOptions; this.globalOptions = kompileOptions.global;
<<<<<<< list.getContents().add(IntBuiltin.kAppOf(bndIdx)); rule = new Rule(new KApp(BOUNDED_PREDICATE, list), BoolBuiltin.TRUE); ======= list.getContents().add(IntBuiltin.of(bndIdx)); rule = new Rule(new KApp(BOUNDED_PREDICATE, list), BoolBuiltin.TRUE, definitionHelper); >>>>>>> list.getContents().add(IntBuiltin.kAppOf(bndIdx)); rule = new Rule(new KApp(BOUNDED_PREDICATE, list), BoolBuiltin.TRUE, definitionHelper); <<<<<<< list.getContents().add(IntBuiltin.kAppOf(bodyIdx)); rule = new Rule(new KApp(BOUNDING_PREDICATE, list), BoolBuiltin.TRUE); ======= list.getContents().add(IntBuiltin.of(bodyIdx)); rule = new Rule(new KApp(BOUNDING_PREDICATE, list), BoolBuiltin.TRUE, definitionHelper); >>>>>>> list.getContents().add(IntBuiltin.kAppOf(bodyIdx)); rule = new Rule(new KApp(BOUNDING_PREDICATE, list), BoolBuiltin.TRUE, definitionHelper);
<<<<<<< private SMTLibTerm translate(JavaSymbolicObject object) { ASTNode astNode = object.accept(this); if (astNode instanceof SMTLibTerm) { return (SMTLibTerm) astNode; } else { throw new SMTTranslationFailure(); } } ======= >>>>>>> private SMTLibTerm translate(JavaSymbolicObject object) { ASTNode astNode = object.accept(this); if (astNode instanceof SMTLibTerm) { return (SMTLibTerm) astNode; } else { throw new SMTTranslationFailure(); } } <<<<<<< KILtoSMTLib kil2SMT = new KILtoSMTLib(false, global); String leftExpression = kil2SMT.translate(rule.leftHandSide()).expression(); String rightExpression = kil2SMT.translate(rule.rightHandSide()).expression(); ======= KILtoSMTLib transformer = new KILtoSMTLib(false, definition, krunOptions); String leftExpression = ((SMTLibTerm) rule.leftHandSide().accept(transformer)).expression(); String rightExpression = ((SMTLibTerm) rule.rightHandSide().accept(transformer)).expression(); >>>>>>> KILtoSMTLib kil2SMT = new KILtoSMTLib(false, definition, krunOptions); String leftExpression = kil2SMT.translate(rule.leftHandSide()).expression(); String rightExpression = kil2SMT.translate(rule.rightHandSide()).expression();
<<<<<<< public List<Triple<ConjunctiveFormula, Boolean, Integer>> mainMatch( ConstrainedTerm subject, Term pattern, BitSet ruleMask, boolean computeOne, TermContext context) { ruleMask.stream().forEach(i -> constraints[i] = ConjunctiveFormula.of(context.global())); ======= public List<Pair<Substitution<Variable, Term>, Integer>> mainMatch(Term subject, Term pattern, BitSet ruleMask, boolean computeOne, TermContext context) { ruleMask.stream().forEach(i -> substitutions[i].clear()); rewrites = new Map[ruleMask.length()]; >>>>>>> public List<Triple<ConjunctiveFormula, Boolean, Integer>> mainMatch( ConstrainedTerm subject, Term pattern, BitSet ruleMask, boolean computeOne, TermContext context) { ruleMask.stream().forEach(i -> constraints[i] = ConjunctiveFormula.of(context.global())); rewrites = new Map[ruleMask.length()];
<<<<<<< protected boolean run() { try { scope.enter(kompiledDir.get()); backend.get().run(def.get()); return true; } finally { scope.exit(); } ======= protected int run() { backend.run(def.get()); return 0; >>>>>>> protected int run() { try { scope.enter(kompiledDir.get()); backend.get().run(def.get()); return 0; } finally { scope.exit(); }
<<<<<<< javaDef = (Definition) loader.loadOrDie(Definition.class, canoFile.toString()); ======= javaDef = BinaryLoader.loadOrDie(Definition.class, canoFile.toString()); >>>>>>> javaDef = loader.loadOrDie(Definition.class, canoFile.toString()); <<<<<<< Map<String, CachedSentence> cachedDefTemp = (Map<String, CachedSentence>) loader.load(Map.class, cacheFile); ======= Map<String, CachedSentence> cachedDefTemp = BinaryLoader.load(Map.class, cacheFile); >>>>>>> Map<String, CachedSentence> cachedDefTemp = loader.load(Map.class, cacheFile);
<<<<<<< String[] lines = output.split("\n"); int count = Integer.parseInt(lines[0]); int line = 1; List<Map<KVariable, K>> list = new ArrayList<>(); for (int i = 0; i < count; i++) { Map<KVariable, K> map = new HashMap<>(); list.add(map); for (; line < lines.length; line += 2) { if (lines[line].equals("|")) { line++; break; } KVariable key = KVariable(lines[line]); K value = parseOcamlOutput(lines[line + 1]); map.put(key, value); } } return list; ======= return parseOcamlSearchOutput(output); } @Override public Tuple2<K, List<Map<KVariable, K>>> executeAndMatch(K k, Optional<Integer> depth, Rule rule) { String ocaml = converter.executeAndMatch(k, depth.orElse(-1), rule, files.resolveTemp("run.out").getAbsolutePath(), files.resolveTemp("run.subst").getAbsolutePath()); files.saveToTemp("pgm.ml", ocaml); String output = compileAndExecOcaml("pgm.ml"); String subst = files.loadFromTemp("run.subst"); return Tuple2.apply(parseOcamlOutput(output), parseOcamlSearchOutput(subst)); >>>>>>> String[] lines = output.split("\n"); int count = Integer.parseInt(lines[0]); int line = 1; List<Map<KVariable, K>> list = new ArrayList<>(); for (int i = 0; i < count; i++) { Map<KVariable, K> map = new HashMap<>(); list.add(map); for (; line < lines.length; line += 2) { if (lines[line].equals("|")) { line++; break; } KVariable key = KVariable(lines[line]); K value = parseOcamlOutput(lines[line + 1]); map.put(key, value); } } return parseOcamlSearchOutput(output); } @Override public Tuple2<K, List<Map<KVariable, K>>> executeAndMatch(K k, Optional<Integer> depth, Rule rule) { String ocaml = converter.executeAndMatch(k, depth.orElse(-1), rule, files.resolveTemp("run.out").getAbsolutePath(), files.resolveTemp("run.subst").getAbsolutePath()); files.saveToTemp("pgm.ml", ocaml); String output = compileAndExecOcaml("pgm.ml"); String subst = files.loadFromTemp("run.subst"); return Tuple2.apply(parseOcamlOutput(output), parseOcamlSearchOutput(subst));
<<<<<<< this.accept(new UpdateReferencesVisitor()); this.accept(new AddConsesVisitor()); this.accept(new CollectConsesVisitor()); this.accept(new CollectSubsortsVisitor()); this.accept(new CollectPrioritiesVisitor()); this.accept(new CollectStartSymbolPgmVisitor()); this.accept(new CollectConfigCellsVisitor()); this.accept(new UpdateAssocVisitor()); this.accept(new CollectLocationsVisitor()); TokenSorts tokenSortsVisitor = new TokenSorts(); this.accept(tokenSortsVisitor); tokenNames.addAll(tokenSortsVisitor.getNames()); // TODO: fix #Id tokenNames.add("#Id"); DefinitionHelper.initialized = true; ======= this.accept(new UpdateReferencesVisitor(definitionHelper)); this.accept(new AddConsesVisitor(definitionHelper)); this.accept(new CollectConsesVisitor(definitionHelper)); this.accept(new CollectSubsortsVisitor(definitionHelper)); this.accept(new CollectPrioritiesVisitor(definitionHelper)); this.accept(new CollectStartSymbolPgmVisitor(definitionHelper)); this.accept(new CollectConfigCellsVisitor(definitionHelper)); this.accept(new UpdateAssocVisitor(definitionHelper)); this.accept(new CollectLocationsVisitor(definitionHelper)); definitionHelper.initialized = true; >>>>>>> this.accept(new UpdateReferencesVisitor(definitionHelper)); this.accept(new AddConsesVisitor(definitionHelper)); this.accept(new CollectConsesVisitor(definitionHelper)); this.accept(new CollectSubsortsVisitor(definitionHelper)); this.accept(new CollectPrioritiesVisitor(definitionHelper)); this.accept(new CollectStartSymbolPgmVisitor(definitionHelper)); this.accept(new CollectConfigCellsVisitor(definitionHelper)); this.accept(new UpdateAssocVisitor(definitionHelper)); this.accept(new CollectLocationsVisitor(definitionHelper)); TokenSorts tokenSortsVisitor = new TokenSorts(); this.accept(tokenSortsVisitor); tokenNames.addAll(tokenSortsVisitor.getNames()); // TODO: fix #Id tokenNames.add("#Id"); definitionHelper.initialized = true;
<<<<<<< import org.kframework.utils.inject.DefinitionScope; ======= import org.kframework.utils.inject.Concrete; >>>>>>> import org.kframework.utils.inject.DefinitionScope; import org.kframework.utils.inject.Concrete; <<<<<<< Provider<PosterBackend> backend, Provider<Definition> def, FileUtil files, DefinitionScope scope, @KompiledDir Provider<File> kompiledDir) { ======= PosterBackend backend, @Concrete Provider<Definition> def, FileUtil files) { >>>>>>> Provider<PosterBackend> backend, @Concrete Provider<Definition> def, FileUtil files, DefinitionScope scope, @KompiledDir Provider<File> kompiledDir) {
<<<<<<< Term configuration = (Term) new SubstitutionFilter(args, context).visitNode(cfgCleaned); configuration = (Term) new Cell2DataStructure(context).visitNode(configuration); return configuration; ======= try { Term configuration = (Term) cfgCleaned.accept(new SubstitutionFilter(args, context)); configuration = (Term) configuration .accept(new Cell2DataStructure(context)); return configuration; } catch (TransformerException e) { throw new AssertionError("should not have thrown TransformerException", e); } >>>>>>> try { Term configuration = (Term) new SubstitutionFilter(args, context).visitNode(cfgCleaned); configuration = (Term) new Cell2DataStructure(context).visitNode(configuration); return configuration; } catch (TransformerException e) { throw new AssertionError("should not have thrown TransformerException", e); } <<<<<<< parsed = (Term) new ResolveVariableAttribute(context).visitNode(parsed); ======= try { parsed = (Term) parsed.accept(new ResolveVariableAttribute(context)); } catch (TransformerException e) { throw new AssertionError("should not have thrown TransformerException", e); } >>>>>>> try { parsed = (Term) new ResolveVariableAttribute(context).visitNode(parsed); } catch (TransformerException e) { throw new AssertionError("should not have thrown TransformerException", e); }
<<<<<<< import java.awt.Color; ======= import com.davekoelle.AlphanumComparator; >>>>>>> import com.davekoelle.AlphanumComparator; import java.awt.Color;
<<<<<<< ======= import org.kframework.kil.loader.Constants; import org.kframework.krun.K; >>>>>>> import org.kframework.kil.loader.Constants;
<<<<<<< sdf.append(" " + StringUtil.escapeSortName(si.getSort().getName()) + " \"" + si.getSeparator() + "\" " + StringUtil.escapeSortName(p.getSort().getName()) + " -> " + StringUtil.escapeSortName(p.getSort().getName())); ======= sdf.append(" " + StringUtil.escapeSortName(si.getSort()) + " " + StringUtil.enquoteCString(si.getSeparator()) + " " + StringUtil.escapeSortName(p.getSort()) + " -> " + StringUtil.escapeSortName(p.getSort())); >>>>>>> sdf.append(" " + StringUtil.escapeSortName(si.getSort().getName()) + " " + StringUtil.enquoteCString(si.getSeparator()) + " " + StringUtil.escapeSortName(p.getSort().getName()) + " -> " + StringUtil.escapeSortName(p.getSort().getName())); <<<<<<< sdf.append("\"" + StringUtil.escape(t.getTerminal()) + "\" "); } else if (itm instanceof NonTerminal) { NonTerminal srt = (NonTerminal) itm; ======= sdf.append(StringUtil.enquoteCString(t.getTerminal()) + " "); } else if (itm instanceof Sort) { Sort srt = (Sort) itm; >>>>>>> sdf.append(StringUtil.enquoteCString(t.getTerminal()) + " "); } else if (itm instanceof NonTerminal) { NonTerminal srt = (NonTerminal) itm; <<<<<<< sdf.append(" \"" + StringUtil.escape(t) + "\" -> " + StringUtil.escapeSortName(p.getSort().getName()) + "Dz {reject}\n"); ======= sdf.append(" " + StringUtil.enquoteCString(t) + " -> " + StringUtil.escapeSortName(p.getSort()) + "Dz {reject}\n"); >>>>>>> sdf.append(" " + StringUtil.enquoteCString(t) + " -> " + StringUtil.escapeSortName(p.getSort().getName()) + "Dz {reject}\n"); <<<<<<< sdf.append(" \"" + StringUtil.escape(t) + "\" -> " + StringUtil.escapeSortName(p.getSort().getName()) + "Dz {reject}\n"); ======= sdf.append(" " + StringUtil.enquoteCString(t) + " -> " + StringUtil.escapeSortName(p.getSort()) + "Dz {reject}\n"); >>>>>>> sdf.append(" " + StringUtil.enquoteCString(t) + " -> " + StringUtil.escapeSortName(p.getSort().getName()) + "Dz {reject}\n");